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/Transitions
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/Transitions')
-rw-r--r--plugins/Transitions/API.php36
1 files changed, 18 insertions, 18 deletions
diff --git a/plugins/Transitions/API.php b/plugins/Transitions/API.php
index 4e4d0ab038..2b35a6e271 100644
--- a/plugins/Transitions/API.php
+++ b/plugins/Transitions/API.php
@@ -9,7 +9,7 @@
* @package Piwik_Transitions
*/
use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
/**
* @package Piwik_Transitions
@@ -128,7 +128,7 @@ class Piwik_Transitions_API
switch ($actionType) {
case 'url':
$originalActionName = $actionName;
- $actionName = Piwik_Common::unsanitizeInputValue($actionName);
+ $actionName = Common::unsanitizeInputValue($actionName);
$id = $actionsPlugin->getIdActionFromSegment($actionName, 'idaction_url', Piwik_SegmentExpression::MATCH_EQUAL, 'pageUrl');
if ($id < 0) {
@@ -343,18 +343,18 @@ class Piwik_Transitions_API
$rankingQuery->addLabelColumn('referrer_data');
$selects = array(
'CASE log_visit.referer_type
- WHEN ' . Piwik_Common::REFERER_TYPE_DIRECT_ENTRY . ' THEN \'\'
- WHEN ' . Piwik_Common::REFERER_TYPE_SEARCH_ENGINE . ' THEN log_visit.referer_keyword
- WHEN ' . Piwik_Common::REFERER_TYPE_WEBSITE . ' THEN log_visit.referer_url
- WHEN ' . Piwik_Common::REFERER_TYPE_CAMPAIGN . ' THEN CONCAT(log_visit.referer_name, \' \', log_visit.referer_keyword)
+ WHEN ' . Common::REFERER_TYPE_DIRECT_ENTRY . ' THEN \'\'
+ WHEN ' . Common::REFERER_TYPE_SEARCH_ENGINE . ' THEN log_visit.referer_keyword
+ WHEN ' . Common::REFERER_TYPE_WEBSITE . ' THEN log_visit.referer_url
+ WHEN ' . Common::REFERER_TYPE_CAMPAIGN . ' THEN CONCAT(log_visit.referer_name, \' \', log_visit.referer_keyword)
END AS `referrer_data`');
// get one limited group per referrer type
$rankingQuery->partitionResultIntoMultipleGroups('referer_type', array(
- Piwik_Common::REFERER_TYPE_DIRECT_ENTRY,
- Piwik_Common::REFERER_TYPE_SEARCH_ENGINE,
- Piwik_Common::REFERER_TYPE_WEBSITE,
- Piwik_Common::REFERER_TYPE_CAMPAIGN
+ Common::REFERER_TYPE_DIRECT_ENTRY,
+ Common::REFERER_TYPE_SEARCH_ENGINE,
+ Common::REFERER_TYPE_WEBSITE,
+ Common::REFERER_TYPE_CAMPAIGN
));
$type = $this->getColumnTypeSuffix($actionType);
@@ -368,12 +368,12 @@ class Piwik_Transitions_API
foreach ($data as $referrerType => &$subData) {
$referrerData[$referrerType] = array(Piwik_Metrics::INDEX_NB_VISITS => 0);
- if ($referrerType != Piwik_Common::REFERER_TYPE_DIRECT_ENTRY) {
+ if ($referrerType != Common::REFERER_TYPE_DIRECT_ENTRY) {
$referrerSubData[$referrerType] = array();
}
foreach ($subData as &$row) {
- if ($referrerType == Piwik_Common::REFERER_TYPE_SEARCH_ENGINE && empty($row['referrer_data'])) {
+ if ($referrerType == Common::REFERER_TYPE_SEARCH_ENGINE && empty($row['referrer_data'])) {
$row['referrer_data'] = Piwik_Referers_API::LABEL_KEYWORD_NOT_DEFINED;
}
@@ -581,8 +581,8 @@ class Piwik_Transitions_API
// causes an exception.
if (count($report['referrers']) == 0) {
$report['referrers'][] = array(
- 'label' => $this->getReferrerLabel(Piwik_Common::REFERER_TYPE_DIRECT_ENTRY),
- 'shortName' => Piwik_getRefererTypeLabel(Piwik_Common::REFERER_TYPE_DIRECT_ENTRY),
+ 'label' => $this->getReferrerLabel(Common::REFERER_TYPE_DIRECT_ENTRY),
+ 'shortName' => Piwik_getRefererTypeLabel(Common::REFERER_TYPE_DIRECT_ENTRY),
'visits' => 0
);
}
@@ -591,13 +591,13 @@ class Piwik_Transitions_API
private function getReferrerLabel($referrerId)
{
switch ($referrerId) {
- case Piwik_Common::REFERER_TYPE_DIRECT_ENTRY:
+ case Common::REFERER_TYPE_DIRECT_ENTRY:
return Piwik_Transitions_Controller::getTranslation('directEntries');
- case Piwik_Common::REFERER_TYPE_SEARCH_ENGINE:
+ case Common::REFERER_TYPE_SEARCH_ENGINE:
return Piwik_Transitions_Controller::getTranslation('fromSearchEngines');
- case Piwik_Common::REFERER_TYPE_WEBSITE:
+ case Common::REFERER_TYPE_WEBSITE:
return Piwik_Transitions_Controller::getTranslation('fromWebsites');
- case Piwik_Common::REFERER_TYPE_CAMPAIGN:
+ case Common::REFERER_TYPE_CAMPAIGN:
return Piwik_Transitions_Controller::getTranslation('fromCampaigns');
default:
return Piwik_Translate('General_Others');