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:
authorFabian Becker <fabian.becker@uni-tuebingen.de>2013-07-18 13:45:02 +0400
committerFabian Becker <fabian.becker@uni-tuebingen.de>2013-07-18 13:45:02 +0400
commit03b4953f008c1063e6d7166143ba844e8c6e89cc (patch)
tree7b9f0fef13d75417c551f813c98dba1a22f2fff3 /plugins/API
parent9b2c0a7a450fff3b634f8119c8003ae1d20b97d0 (diff)
Refactor class Piwik_Common to \Piwik\Core\Common
Notice that auto refactoring has created a nested namespace. Not sure this is what we want - so we might have to edit those nested namespaces afterwards (I think they don't look so good)
Diffstat (limited to 'plugins/API')
-rw-r--r--plugins/API/API.php20
-rw-r--r--plugins/API/Controller.php6
-rw-r--r--plugins/API/ProcessedReport.php6
-rw-r--r--plugins/API/RowEvolution.php4
4 files changed, 18 insertions, 18 deletions
diff --git a/plugins/API/API.php b/plugins/API/API.php
index a08e046c4b..16cba3ce4e 100644
--- a/plugins/API/API.php
+++ b/plugins/API/API.php
@@ -9,7 +9,7 @@
* @package Piwik_API
*/
use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
/**
* @package Piwik_API
@@ -304,14 +304,14 @@ class Piwik_API_API
{
$logo = 'plugins/Zeitgeist/images/logo.png';
if (Config::getInstance()->branding['use_custom_logo'] == 1
- && file_exists(Piwik_Common::getPathToPiwikRoot() . '/misc/user/logo.png')
+ && file_exists(Common::getPathToPiwikRoot() . '/misc/user/logo.png')
) {
$logo = 'misc/user/logo.png';
}
if (!$pathOnly) {
return Piwik::getPiwikUrl() . $logo;
}
- return Piwik_Common::getPathToPiwikRoot() . '/' . $logo;
+ return Common::getPathToPiwikRoot() . '/' . $logo;
}
/**
@@ -324,14 +324,14 @@ class Piwik_API_API
{
$logo = 'plugins/Zeitgeist/images/logo-header.png';
if (Config::getInstance()->branding['use_custom_logo'] == 1
- && file_exists(Piwik_Common::getPathToPiwikRoot() . '/misc/user/logo-header.png')
+ && file_exists(Common::getPathToPiwikRoot() . '/misc/user/logo-header.png')
) {
$logo = 'misc/user/logo-header.png';
}
if (!$pathOnly) {
return Piwik::getPiwikUrl() . $logo;
}
- return Piwik_Common::getPathToPiwikRoot() . '/' . $logo;
+ return Common::getPathToPiwikRoot() . '/' . $logo;
}
/**
@@ -345,14 +345,14 @@ class Piwik_API_API
{
$logo = 'plugins/Zeitgeist/images/logo.svg';
if (Config::getInstance()->branding['use_custom_logo'] == 1
- && file_exists(Piwik_Common::getPathToPiwikRoot() . '/misc/user/logo.svg')
+ && file_exists(Common::getPathToPiwikRoot() . '/misc/user/logo.svg')
) {
$logo = 'misc/user/logo.svg';
}
if (!$pathOnly) {
return Piwik::getPiwikUrl() . $logo;
}
- return Piwik_Common::getPathToPiwikRoot() . '/' . $logo;
+ return Common::getPathToPiwikRoot() . '/' . $logo;
}
/**
@@ -366,7 +366,7 @@ class Piwik_API_API
/* We always have our application logo */
return true;
} else if (Config::getInstance()->branding['use_custom_logo'] == 1
- && file_exists(Piwik_Common::getPathToPiwikRoot() . '/misc/user/logo.svg')
+ && file_exists(Common::getPathToPiwikRoot() . '/misc/user/logo.svg')
) {
return true;
}
@@ -553,7 +553,7 @@ class Piwik_API_API
}
$urls = array_map('urldecode', $urls);
- $urls = array_map(array('Piwik\Core\Piwik_Common', 'unsanitizeInputValue'), $urls);
+ $urls = array_map(array('Piwik\Core\Common', 'unsanitizeInputValue'), $urls);
$result = array();
foreach ($urls as $url) {
@@ -629,7 +629,7 @@ class Piwik_API_API
arsort($values);
$values = array_keys($values);
- $values = array_map(array('Piwik\Core\Piwik_Common', 'unsanitizeInputValue'), $values);
+ $values = array_map(array('Piwik\Core\Common', 'unsanitizeInputValue'), $values);
$values = array_slice($values, 0, $maxSuggestionsToReturn);
return $values;
diff --git a/plugins/API/Controller.php b/plugins/API/Controller.php
index 8d70af3650..c18bfc3e85 100644
--- a/plugins/API/Controller.php
+++ b/plugins/API/Controller.php
@@ -9,7 +9,7 @@
* @package Piwik_API
*/
use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
/**
*
@@ -23,14 +23,14 @@ class Piwik_API_Controller extends Piwik_Controller
if (!isset($_GET['filter_limit'])) {
$_GET['filter_limit'] = Config::getInstance()->General['API_datatable_default_limit'];
}
- $request = new Piwik_API_Request('token_auth=' . Piwik_Common::getRequestVar('token_auth', 'anonymous', 'string'));
+ $request = new Piwik_API_Request('token_auth=' . Common::getRequestVar('token_auth', 'anonymous', 'string'));
echo $request->process();
}
public function listAllMethods()
{
$ApiDocumentation = new Piwik_API_DocumentationGenerator();
- echo $ApiDocumentation->getAllInterfaceString($outputExampleUrls = true, $prefixUrls = Piwik_Common::getRequestVar('prefixUrl', ''));
+ echo $ApiDocumentation->getAllInterfaceString($outputExampleUrls = true, $prefixUrls = Common::getRequestVar('prefixUrl', ''));
}
public function listAllAPI()
diff --git a/plugins/API/ProcessedReport.php b/plugins/API/ProcessedReport.php
index 318929f1ce..2417a558ab 100644
--- a/plugins/API/ProcessedReport.php
+++ b/plugins/API/ProcessedReport.php
@@ -1,6 +1,6 @@
<?php
use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
/**
* Piwik - Open source web analytics
@@ -425,7 +425,7 @@ class Piwik_API_ProcessedReport
}
// remove columns if hideColumns query parameters exist
- $columnsToRemove = Piwik_Common::getRequestVar('hideColumns', '');
+ $columnsToRemove = Common::getRequestVar('hideColumns', '');
if ($columnsToRemove != '') {
$columnsToRemove = explode(',', $columnsToRemove);
foreach ($columnsToRemove as $name) {
@@ -437,7 +437,7 @@ class Piwik_API_ProcessedReport
}
// remove columns if showColumns query parameters exist
- $columnsToKeep = Piwik_Common::getRequestVar('showColumns', '');
+ $columnsToKeep = Common::getRequestVar('showColumns', '');
if ($columnsToKeep != '') {
$columnsToKeep = explode(',', $columnsToKeep);
$columnsToKeep[] = 'label';
diff --git a/plugins/API/RowEvolution.php b/plugins/API/RowEvolution.php
index dfc24d6a6a..f0eca1b190 100644
--- a/plugins/API/RowEvolution.php
+++ b/plugins/API/RowEvolution.php
@@ -9,7 +9,7 @@
* @package Piwik_API
*/
use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
/**
* This class generates a Row evolution dataset, from input request
@@ -92,7 +92,7 @@ class Piwik_API_RowEvolution
// if the filter_limit query param is set, treat it as a request to limit
// the number of labels used
- $limit = Piwik_Common::getRequestVar('filter_limit', false);
+ $limit = Common::getRequestVar('filter_limit', false);
if ($limit != false
&& $limit >= 0
) {