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:
authormattab <matthieu.aubry@gmail.com>2013-07-23 11:52:15 +0400
committermattab <matthieu.aubry@gmail.com>2013-07-23 11:52:15 +0400
commit5104d94f3b2250f766b9c520e2da8da9b4cab2e9 (patch)
tree5f30daf7bc14373fb1bbd0504ce11a771dafc02f /plugins/Proxy
parentae4b1f4e38077b174e4df5b7d4513d63fe026a24 (diff)
Refs #4059 Work in progress: Conversion to use Namespaces of dozen more classes
Removed many Piwik_ functions, in Piwik 2 it is best practise to use the methods calls instead Todo: finish converting core/ classes + convert plugins/ classes to use \Piwik\Plugin namespace + fix build + Merge master
Diffstat (limited to 'plugins/Proxy')
-rw-r--r--plugins/Proxy/Controller.php13
-rw-r--r--plugins/Proxy/Proxy.php3
2 files changed, 10 insertions, 6 deletions
diff --git a/plugins/Proxy/Controller.php b/plugins/Proxy/Controller.php
index 9f49505e97..6633a70f5d 100644
--- a/plugins/Proxy/Controller.php
+++ b/plugins/Proxy/Controller.php
@@ -10,13 +10,16 @@
*/
use Piwik\Piwik;
use Piwik\Common;
+use Piwik\AssetManager;
+use Piwik\Controller;
+use Piwik\Url;
/**
* Controller for proxy services
*
* @package Piwik_Proxy
*/
-class Piwik_Proxy_Controller extends Piwik_Controller
+class Piwik_Proxy_Controller extends Controller
{
const TRANSPARENT_PNG_PIXEL = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=';
@@ -28,7 +31,7 @@ class Piwik_Proxy_Controller extends Piwik_Controller
*/
public function getCss()
{
- $cssMergedFile = Piwik_AssetManager::getMergedCssFileLocation();
+ $cssMergedFile = AssetManager::getMergedCssFileLocation();
Piwik::serveStaticFile($cssMergedFile, "text/css");
}
@@ -40,7 +43,7 @@ class Piwik_Proxy_Controller extends Piwik_Controller
*/
public function getJs()
{
- $jsMergedFile = Piwik_AssetManager::getMergedJsFileLocation();
+ $jsMergedFile = AssetManager::getMergedJsFileLocation();
Piwik::serveStaticFile($jsMergedFile, "application/javascript; charset=UTF-8");
}
@@ -55,8 +58,8 @@ class Piwik_Proxy_Controller extends Piwik_Controller
$url = Common::getRequestVar('url', '', 'string', $_GET);
// validate referrer
- $referrer = Piwik_Url::getReferer();
- if (empty($referrer) || !Piwik_Url::isLocalUrl($referrer)) {
+ $referrer = Url::getReferer();
+ if (empty($referrer) || !Url::isLocalUrl($referrer)) {
die('Invalid Referer detected - This means that your web browser is not sending the "Referer URL" which is
required to proceed with the redirect. Verify your browser settings and add-ons, to check why your browser
is not sending this referer.
diff --git a/plugins/Proxy/Proxy.php b/plugins/Proxy/Proxy.php
index fc404bfd2e..47d085a70c 100644
--- a/plugins/Proxy/Proxy.php
+++ b/plugins/Proxy/Proxy.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Proxy
*/
+use Piwik\Version;
use Piwik\Plugin;
/**
@@ -30,7 +31,7 @@ class Piwik_Proxy extends Plugin
'description' => 'Proxy services',
'author' => 'Piwik',
'author_homepage' => 'http://piwik.org/',
- 'version' => Piwik_Version::VERSION,
+ 'version' => Version::VERSION,
'translationAvailable' => false,
);
}