Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Proxy/Controller.php')
-rw-r--r--plugins/Proxy/Controller.php67
1 files changed, 0 insertions, 67 deletions
diff --git a/plugins/Proxy/Controller.php b/plugins/Proxy/Controller.php
index f7f71bb8a8..9f49505e97 100644
--- a/plugins/Proxy/Controller.php
+++ b/plugins/Proxy/Controller.php
@@ -21,73 +21,6 @@ class Piwik_Proxy_Controller extends Piwik_Controller
const TRANSPARENT_PNG_PIXEL = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=';
/**
- * Display the "Export Image" window.
- *
- * @deprecated 1.5.1
- *
- * @internal param string $imageData Base-64 encoded image data (via $_POST)
- */
- static public function exportImageWindow()
- {
- Piwik::checkUserHasSomeViewAccess();
-
- $view = new Piwik_View('@Proxy/exportImageWindow');
- $view->imageData = 'data:image/png;base64,' . Common::getRequestVar('imageData', self::TRANSPARENT_PNG_PIXEL, 'string', $_POST);
- echo $view->render();
- }
-
- function exportImage()
- {
- self::exportImageWindow();
- }
-
- /**
- * Output binary image from base-64 encoded data.
- *
- * @deprecated 1.5.1
- *
- * @internal param string $imageData Base-64 encoded image data (via $_POST)
- */
- static public function outputBinaryImage()
- {
- Piwik::checkUserHasSomeViewAccess();
-
- $rawData = Common::getRequestVar('imageData', '', 'string', $_POST);
-
- // returns false if any illegal characters in input
- $data = base64_decode($rawData);
- if ($data !== false) {
- // check for PNG header
- if (Common::substr($data, 0, 8) === "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a") {
- header('Content-Type: image/png');
-
- // more robust validation (if available)
- if (function_exists('imagecreatefromstring')) {
- // validate image data
- $imgResource = @imagecreatefromstring($data);
- if ($imgResource !== false) {
- // output image and clean-up
- imagepng($imgResource);
- imagedestroy($imgResource);
- exit;
- }
- } else {
- echo $data;
- exit;
- }
- }
- }
-
- Piwik::setHttpStatus('400 Bad Request');
- exit;
- }
-
- function outputImage()
- {
- self::outputBinaryImage();
- }
-
- /**
* Output the merged CSS file.
* This method is called when the asset manager is enabled.
*