diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-07-31 02:47:37 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-07-31 02:47:37 +0400 |
commit | 84a6fa7da882aae8717298f5e7ca1bdbd9c337ff (patch) | |
tree | bf15c1f281240d09f943449e25fac9f64890249d /plugins | |
parent | ae66dd9ddade00aba21839c07d6d167c2fd85be6 (diff) |
Fixing post merge bugs
Diffstat (limited to 'plugins')
22 files changed, 59 insertions, 48 deletions
diff --git a/plugins/Actions/Controller.php b/plugins/Actions/Controller.php index 36002fe2de..9ce7800197 100644 --- a/plugins/Actions/Controller.php +++ b/plugins/Actions/Controller.php @@ -87,66 +87,66 @@ class Piwik_Actions_Controller extends Controller public function getPageUrls($fetch = false) { - return ViewDataTable::render($this->pluginName, __FUNCTION__, $fetch); + return ViewDataTable::renderReport($this->pluginName, __FUNCTION__, $fetch); } public function getEntryPageUrls($fetch = false) { - return ViewDataTable::render($this->pluginName, __FUNCTION__, $fetch); + return ViewDataTable::renderReport($this->pluginName, __FUNCTION__, $fetch); } public function getExitPageUrls($fetch = false) { - return ViewDataTable::render($this->pluginName, __FUNCTION__, $fetch); + return ViewDataTable::renderReport($this->pluginName, __FUNCTION__, $fetch); } public function getSiteSearchKeywords($fetch = false) { - return ViewDataTable::render($this->pluginName, __FUNCTION__, $fetch); + return ViewDataTable::renderReport($this->pluginName, __FUNCTION__, $fetch); } public function getSiteSearchNoResultKeywords($fetch = false) { - return ViewDataTable::render($this->pluginName, __FUNCTION__, $fetch); + return ViewDataTable::renderReport($this->pluginName, __FUNCTION__, $fetch); } public function getSiteSearchCategories($fetch = false) { - return ViewDataTable::render($this->pluginName, __FUNCTION__, $fetch); + return ViewDataTable::renderReport($this->pluginName, __FUNCTION__, $fetch); } public function getPageUrlsFollowingSiteSearch($fetch = false) { - return ViewDataTable::render($this->pluginName, __FUNCTION__, $fetch); + return ViewDataTable::renderReport($this->pluginName, __FUNCTION__, $fetch); } public function getPageTitlesFollowingSiteSearch($fetch = false) { - return ViewDataTable::render($this->pluginName, __FUNCTION__, $fetch); + return ViewDataTable::renderReport($this->pluginName, __FUNCTION__, $fetch); } public function getPageTitles($fetch = false) { - return ViewDataTable::render($this->pluginName, __FUNCTION__, $fetch); + return ViewDataTable::renderReport($this->pluginName, __FUNCTION__, $fetch); } public function getEntryPageTitles($fetch = false) { - return ViewDataTable::render($this->pluginName, __FUNCTION__, $fetch); + return ViewDataTable::renderReport($this->pluginName, __FUNCTION__, $fetch); } public function getExitPageTitles($fetch = false) { - return ViewDataTable::render($this->pluginName, __FUNCTION__, $fetch); + return ViewDataTable::renderReport($this->pluginName, __FUNCTION__, $fetch); } public function getDownloads($fetch = false) { - return ViewDataTable::render($this->pluginName, __FUNCTION__, $fetch); + return ViewDataTable::renderReport($this->pluginName, __FUNCTION__, $fetch); } public function getOutlinks($fetch = false) { - return ViewDataTable::render($this->pluginName, __FUNCTION__, $fetch); + return ViewDataTable::renderReport($this->pluginName, __FUNCTION__, $fetch); } } diff --git a/plugins/Annotations/API.php b/plugins/Annotations/API.php index 8e2ec1c167..a26c0dabc8 100755 --- a/plugins/Annotations/API.php +++ b/plugins/Annotations/API.php @@ -12,6 +12,7 @@ use Piwik\Period; use Piwik\Period\Range; use Piwik\Piwik; use Piwik\Date; +use Piwik\ViewDataTable\GenerateGraphHtml\ChartEvolution; /** * @see plugins/Annotations/AnnotationList.php @@ -329,7 +330,7 @@ class Piwik_Annotations_API } else // if the range includes the last N periods { list($date, $lastN) = - Piwik_ViewDataTable_GenerateGraphHTML_ChartEvolution::getDateRangeAndLastN($period, $date, $lastN); + ChartEvolution::getDateRangeAndLastN($period, $date, $lastN); list($startDate, $endDate) = explode(',', $date); $startDate = Date::factory($startDate); diff --git a/plugins/CoreAdminHome/Controller.php b/plugins/CoreAdminHome/Controller.php index 7ccf51921e..b4de7b1d1d 100644 --- a/plugins/CoreAdminHome/Controller.php +++ b/plugins/CoreAdminHome/Controller.php @@ -161,7 +161,7 @@ class Piwik_CoreAdminHome_Controller extends Admin // get currencies for each viewable site $view->currencySymbols = Piwik_SitesManager_API::getInstance()->getCurrencySymbols(); - $view->serverSideDoNotTrackEnabled = Piwik_PrivacyManager_Controller::isDntSupported(); + $view->serverSideDoNotTrackEnabled = \Piwik_PrivacyManager_Controller::isDntSupported(); echo $view->render(); } diff --git a/plugins/CoreHome/Controller.php b/plugins/CoreHome/Controller.php index 52539d400e..15ff5f7d48 100644 --- a/plugins/CoreHome/Controller.php +++ b/plugins/CoreHome/Controller.php @@ -20,6 +20,7 @@ use Piwik\Url; use Piwik\UpdateCheck; use Piwik\Site; + /** * * @package Piwik_CoreHome @@ -138,7 +139,7 @@ class Piwik_CoreHome_Controller extends Controller public function getRowEvolutionPopover() { $rowEvolution = $this->makeRowEvolution($isMulti = false); - $view = new Piwik_View('@CoreHome/getRowEvolutionPopover'); + $view = new View('@CoreHome/getRowEvolutionPopover'); echo $rowEvolution->renderPopover($this, $view); } @@ -146,7 +147,7 @@ class Piwik_CoreHome_Controller extends Controller public function getMultiRowEvolutionPopover() { $rowEvolution = $this->makeRowEvolution($isMulti = true); - $view = new Piwik_View('@CoreHome/getMultiRowEvolutionPopover'); + $view = new View('@CoreHome/getMultiRowEvolutionPopover'); echo $rowEvolution->renderPopover($this, $view); } diff --git a/plugins/CoreHome/DataTableRowAction/MultiRowEvolution.php b/plugins/CoreHome/DataTableRowAction/MultiRowEvolution.php index fa6478c167..d23a2fff83 100644 --- a/plugins/CoreHome/DataTableRowAction/MultiRowEvolution.php +++ b/plugins/CoreHome/DataTableRowAction/MultiRowEvolution.php @@ -59,7 +59,7 @@ class Piwik_CoreHome_DataTableRowAction_MultiRowEvolution /** * Render the popover * @param Piwik_CoreHome_Controller - * @param Piwik_View (the popover_rowevolution template) + * @param View (the popover_rowevolution template) */ public function renderPopover($controller, $view) { diff --git a/plugins/CoreHome/DataTableRowAction/RowEvolution.php b/plugins/CoreHome/DataTableRowAction/RowEvolution.php index 7b2c908bd1..d7469643ff 100644 --- a/plugins/CoreHome/DataTableRowAction/RowEvolution.php +++ b/plugins/CoreHome/DataTableRowAction/RowEvolution.php @@ -15,6 +15,8 @@ use Piwik\Metrics; use Piwik\Date; use Piwik\ViewDataTable; use Piwik\Url; +use Piwik\ViewDataTable\GenerateGraphHtml\ChartEvolution; +use Piwik\Visualization\Chart\Evolution; /** * ROW EVOLUTION @@ -97,7 +99,7 @@ class Piwik_CoreHome_DataTableRowAction_RowEvolution // handle day, week, month and year: display last X periods $end = $date->toString(); list($this->date, $lastN) = - Piwik_ViewDataTable_GenerateGraphHTML_ChartEvolution::getDateRangeAndLastN($this->period, $end); + ChartEvolution::getDateRangeAndLastN($this->period, $end); } $this->segment = \Piwik\API\Request::getRawSegmentFromRequest(); @@ -107,7 +109,7 @@ class Piwik_CoreHome_DataTableRowAction_RowEvolution /** * Render the popover * @param Piwik_CoreHome_Controller - * @param Piwik_View (the popover_rowevolution template) + * @param View (the popover_rowevolution template) */ public function renderPopover($controller, $view) { @@ -211,7 +213,7 @@ class Piwik_CoreHome_DataTableRowAction_RowEvolution */ protected function getMetricsToggles() { - $chart = new Piwik_Visualization_Chart_Evolution; + $chart = new Evolution; $i = 0; $metrics = array(); diff --git a/plugins/CoreHome/templates/_dataTable.twig b/plugins/CoreHome/templates/_dataTable.twig index 9aa0757f28..4e12cac5a4 100644 --- a/plugins/CoreHome/templates/_dataTable.twig +++ b/plugins/CoreHome/templates/_dataTable.twig @@ -1,4 +1,4 @@ -{% set summaryRowId = -1 %}{# ID_SUMMARY_ROW #} +{% set summaryRowId = constant('Piwik\\DataTable::ID_SUMMARY_ROW') %}{# ID_SUMMARY_ROW #} {% set isSubtable = javascriptVariablesToSet.idSubtable is defined and javascriptVariablesToSet.idSubtable != 0 %} <div class="dataTable {{ properties.datatable_css_class }} {% if isSubtable %}subDataTable{% endif %}" data-table-type="{{ properties.datatable_js_type|default('dataTable') }}" diff --git a/plugins/CoreHome/templates/_dataTableViz_htmlTable.twig b/plugins/CoreHome/templates/_dataTableViz_htmlTable.twig index 825fb6b6a5..aa3911f628 100644 --- a/plugins/CoreHome/templates/_dataTableViz_htmlTable.twig +++ b/plugins/CoreHome/templates/_dataTableViz_htmlTable.twig @@ -4,7 +4,7 @@ <tbody> {% for rowId, row in dataTable.getRows() %} {%- set rowHasSubtable = row.getIdSubDataTable() and properties.subtable_controller_action is not null -%} - {%- set shouldHighlightRow = rowId == constant("Piwik_DataTable::ID_SUMMARY_ROW") and properties.highlight_summary_row -%} + {%- set shouldHighlightRow = rowId == constant('Piwik\\DataTable::ID_SUMMARY_ROW') and properties.highlight_summary_row -%} {# display this row if it doesn't have a subtable or if we don't replace the row with the subtable #} {% if not rowHasSubtable or not properties.show_expanded|default(false) or not properties.replace_row_with_subtable|default(false) %} diff --git a/plugins/CoreHome/templates/getMultiRowEvolutionPopover.twig b/plugins/CoreHome/templates/getMultiRowEvolutionPopover.twig index 7f027b458e..16ef990aa6 100644 --- a/plugins/CoreHome/templates/getMultiRowEvolutionPopover.twig +++ b/plugins/CoreHome/templates/getMultiRowEvolutionPopover.twig @@ -1,4 +1,4 @@ -{% set seriesColorCount = constant("Piwik_Visualization_Chart_Evolution::SERIES_COLOR_COUNT") %} +{% set seriesColorCount = constant("Evolution::SERIES_COLOR_COUNT") %} <div class="rowevolution multirowevolution"> <div class="popover-title">{{ 'RowEvolution_MultiRowEvolutionTitle'|translate }}</div> <div class="graph"> diff --git a/plugins/CoreHome/templates/getRowEvolutionPopover.twig b/plugins/CoreHome/templates/getRowEvolutionPopover.twig index 4c38c80ac7..fab9fb2437 100644 --- a/plugins/CoreHome/templates/getRowEvolutionPopover.twig +++ b/plugins/CoreHome/templates/getRowEvolutionPopover.twig @@ -1,4 +1,4 @@ -{% set seriesColorCount = constant("Piwik_Visualization_Chart_Evolution::SERIES_COLOR_COUNT") %} +{% set seriesColorCount = constant("Evolution::SERIES_COLOR_COUNT") %} <div class="rowevolution"> <div class="popover-title">{{ popoverTitle | raw }}</div> <div class="graph"> diff --git a/plugins/CoreUpdater/Controller.php b/plugins/CoreUpdater/Controller.php index 642071148c..efc492417b 100644 --- a/plugins/CoreUpdater/Controller.php +++ b/plugins/CoreUpdater/Controller.php @@ -20,6 +20,7 @@ use Piwik\View; use Piwik\Version; use Piwik\UpdateCheck; use Piwik\Unzip; +use Piwik\View\OneClickDone; /** * @@ -90,7 +91,7 @@ class Piwik_CoreUpdater_Controller extends Controller } // this is a magic template to trigger the Piwik_View_Update - $view = new Piwik_View_OneClickDone(Piwik::getCurrentUserTokenAuth()); + $view = new OneClickDone(Piwik::getCurrentUserTokenAuth()); $view->coreError = $errorMessage; $view->feedbackMessages = $messages; echo $view->render(); diff --git a/plugins/DBStats/DBStats.php b/plugins/DBStats/DBStats.php index 467933d1e3..d6b6b0e45f 100644 --- a/plugins/DBStats/DBStats.php +++ b/plugins/DBStats/DBStats.php @@ -10,6 +10,7 @@ */ use Piwik\Piwik; use Piwik\Date; +use Piwik\Common; use Piwik\ScheduledTask; use Piwik\Plugin; @@ -285,7 +286,7 @@ class Piwik_DBStats extends Plugin $runPrettySizeFilterBeforeGeneric = false; $viewDataTable = empty($properties['default_view_type']) ? 'table' : $properties['default_view_type']; - $viewDataTable = Piwik_Common::getRequestVar('viewDataTable', $viewDataTable); + $viewDataTable = Common::getRequestVar('viewDataTable', $viewDataTable); if ($viewDataTable == 'table') { // add summary row only if displaying a table diff --git a/plugins/ExampleUI/Controller.php b/plugins/ExampleUI/Controller.php index d279c4fcad..086e949953 100644 --- a/plugins/ExampleUI/Controller.php +++ b/plugins/ExampleUI/Controller.php @@ -118,7 +118,7 @@ class Piwik_ExampleUI_Controller extends Controller $view = ViewDataTable::factory( 'sparkline', 'ExampleUI.getTemperaturesEvolution', $controllerAction = 'ExampleUI.generateSparkline'); - $serverRequested = Piwik_Common::getRequestVar('server', false); + $serverRequested = Common::getRequestVar('server', false); if ($serverRequested !== false) { $view->columns_to_display = array($serverRequested); } diff --git a/plugins/Goals/Controller.php b/plugins/Goals/Controller.php index 1f3488656a..1ac46c9ca0 100644 --- a/plugins/Goals/Controller.php +++ b/plugins/Goals/Controller.php @@ -15,6 +15,7 @@ use Piwik\Common; use Piwik\DataTable; use Piwik\Controller; use Piwik\FrontController; +use Piwik\View\ReportsByDimension; use Piwik\ViewDataTable; use Piwik\View; @@ -406,7 +407,7 @@ class Piwik_Goals_Controller extends Controller { $preloadAbandonedCart = $cartNbConversions !== false && $conversions == 0; - $goalReportsByDimension = new Piwik_View_ReportsByDimension(); + $goalReportsByDimension = new ReportsByDimension(); // add ecommerce reports $ecommerceCustomParams = array(); diff --git a/plugins/Live/Controller.php b/plugins/Live/Controller.php index 438b178620..3e708d4d79 100644 --- a/plugins/Live/Controller.php +++ b/plugins/Live/Controller.php @@ -83,7 +83,7 @@ class Piwik_Live_Controller extends Controller public function indexVisitorLog() { - $view = new Piwik_View('@Live/indexVisitorLog.twig'); + $view = new View('@Live/indexVisitorLog.twig'); $view->filterEcommerce = Common::getRequestVar('filterEcommerce', 0, 'int'); $view->visitorLog = $this->getLastVisitsDetails($fetch = true); echo $view->render(); @@ -119,7 +119,7 @@ class Piwik_Live_Controller extends Controller private function setCounters($view) { - $segment = Piwik_API_Request::getRawSegmentFromRequest(); + $segment = Request::getRawSegmentFromRequest(); $last30min = Piwik_Live_API::getInstance()->getCounters($this->idSite, $lastMinutes = 30, $segment); $last30min = $last30min[0]; $today = Piwik_Live_API::getInstance()->getCounters($this->idSite, $lastMinutes = 24 * 60, $segment); diff --git a/plugins/Live/Live.php b/plugins/Live/Live.php index c7fe556fe0..dfa08ce8c5 100644 --- a/plugins/Live/Live.php +++ b/plugins/Live/Live.php @@ -9,6 +9,7 @@ * @package Piwik_Live */ use Piwik\Plugin; +use Piwik\Common; use Piwik\WidgetsList; /** @@ -79,7 +80,7 @@ class Piwik_Live extends Plugin // set a very high row count so that the next link in the footer of the data table is always shown 'totalRows' => 10000000, - 'filterEcommerce' => Piwik_Common::getRequestVar('filterEcommerce', 0, 'int'), + 'filterEcommerce' => Common::getRequestVar('filterEcommerce', 0, 'int'), 'pageUrlNotDefined' => Piwik_Translate('General_NotDefined', Piwik_Translate('Actions_ColumnPageURL')) ), ); diff --git a/plugins/Referers/Controller.php b/plugins/Referers/Controller.php index 988f839cfa..017f47dad9 100644 --- a/plugins/Referers/Controller.php +++ b/plugins/Referers/Controller.php @@ -105,7 +105,7 @@ class Piwik_Referers_Controller extends Controller // only display the reports by dimension view if there are visits if ($visits > 0) { - $referrersReportsByDimension = new Piwik_View_ReportsByDimension(); + $referrersReportsByDimension = new View_ReportsByDimension(); $referrersReportsByDimension->addReport( 'Referers_ViewAllReferrers', 'Referers_WidgetGetAll', 'Referers.getAll'); @@ -175,7 +175,7 @@ class Piwik_Referers_Controller extends Controller public function indexWebsites($fetch = false) { - $view = new Piwik_View('@Referers/indexWebsites'); + $view = new View('@Referers/indexWebsites'); $view->websites = $this->getWebsites(true); $view->socials = $this->getSocials(true); if ($fetch) { diff --git a/plugins/Referers/Referers.php b/plugins/Referers/Referers.php index abda5df50e..7a6307769f 100644 --- a/plugins/Referers/Referers.php +++ b/plugins/Referers/Referers.php @@ -10,6 +10,7 @@ */ use Piwik\ArchiveProcessor; use Piwik\Piwik; +use Piwik\Common; use Piwik\Plugin; use Piwik\WidgetsList; @@ -309,16 +310,16 @@ class Piwik_Referers extends Plugin private function getDisplayPropertiesForGetRefererType() { - $idSubtable = Piwik_Common::getRequestVar('idSubtable', false); + $idSubtable = Common::getRequestVar('idSubtable', false); $labelColumnTitle = Piwik_Translate('Referers_ColumnRefererType'); switch ($idSubtable) { - case Piwik_Common::REFERER_TYPE_SEARCH_ENGINE: + case Common::REFERER_TYPE_SEARCH_ENGINE: $labelColumnTitle = Piwik_Translate('Referers_ColumnSearchEngine'); break; - case Piwik_Common::REFERER_TYPE_WEBSITE: + case Common::REFERER_TYPE_WEBSITE: $labelColumnTitle = Piwik_Translate('Referers_ColumnWebsite'); break; - case Piwik_Common::REFERER_TYPE_CAMPAIGN: + case Common::REFERER_TYPE_CAMPAIGN: $labelColumnTitle = Piwik_Translate('Referers_ColumnCampaign'); break; default: @@ -420,7 +421,7 @@ class Piwik_Referers extends Plugin 'translations' => array('label' => Piwik_Translate('Referers_ColumnSocial')) ); - $widget = Piwik_Common::getRequestVar('widget', false); + $widget = Common::getRequestVar('widget', false); if (empty($widget)) { $result['show_footer_message'] = Piwik_Translate('Referers_SocialFooterMessage'); } @@ -487,16 +488,16 @@ class Piwik_Referers extends Plugin // get singular label for referrer type $indexTranslation = ''; switch ($referrerType) { - case Piwik_Common::REFERER_TYPE_DIRECT_ENTRY: + case Common::REFERER_TYPE_DIRECT_ENTRY: $indexTranslation = 'Referers_DirectEntry'; break; - case Piwik_Common::REFERER_TYPE_SEARCH_ENGINE: + case Common::REFERER_TYPE_SEARCH_ENGINE: $indexTranslation = 'Referers_ColumnKeyword'; break; - case Piwik_Common::REFERER_TYPE_WEBSITE: + case Common::REFERER_TYPE_WEBSITE: $indexTranslation = 'Referers_ColumnWebsite'; break; - case Piwik_Common::REFERER_TYPE_CAMPAIGN: + case Common::REFERER_TYPE_CAMPAIGN: $indexTranslation = 'Referers_ColumnCampaign'; break; default: diff --git a/plugins/UserSettings/Archiver.php b/plugins/UserSettings/Archiver.php index 8ce5c83b88..d6ff51d459 100644 --- a/plugins/UserSettings/Archiver.php +++ b/plugins/UserSettings/Archiver.php @@ -21,9 +21,9 @@ require_once PIWIK_INCLUDE_PATH . '/plugins/UserSettings/functions.php'; /** * Archiver for UserSettings Plugin * - * @see Piwik_PluginsArchiver + * @see PluginsArchiver */ -class Piwik_UserSettings_Archiver extends Piwik_PluginsArchiver +class Piwik_UserSettings_Archiver extends PluginsArchiver { const LANGUAGE_RECORD_NAME = 'UserSettings_language'; const PLUGIN_RECORD_NAME = 'UserSettings_plugin'; diff --git a/plugins/VisitTime/VisitTime.php b/plugins/VisitTime/VisitTime.php index c1285f61cd..9b652577d3 100644 --- a/plugins/VisitTime/VisitTime.php +++ b/plugins/VisitTime/VisitTime.php @@ -190,7 +190,7 @@ class Piwik_VisitTime extends Plugin // create a period instance try { - $oPeriod = Period::makePeriodFromQueryParams(Piwik_Site::getTimezoneFor($idSite), $period, $date); + $oPeriod = Period::makePeriodFromQueryParams(Site::getTimezoneFor($idSite), $period, $date); } catch (Exception $ex) { return ''; // if query params are incorrect, forget about the footer message } diff --git a/plugins/VisitorInterest/VisitorInterest.php b/plugins/VisitorInterest/VisitorInterest.php index a46eae1104..a656e73804 100644 --- a/plugins/VisitorInterest/VisitorInterest.php +++ b/plugins/VisitorInterest/VisitorInterest.php @@ -11,6 +11,7 @@ use Piwik\ArchiveProcessor; use Piwik\FrontController; use Piwik\Plugin; +use Piwik\Metrics; use Piwik\WidgetsList; /** @@ -199,7 +200,7 @@ class Piwik_VisitorInterest extends Plugin 'filter_sort_column' => 'label', 'filter_sort_order' => 'asc', 'translations' => array('label' => Piwik_Translate('VisitorInterest_VisitNum'), - 'nb_visits_percentage' => Piwik_Metrics::getPercentVisitColumn()), + 'nb_visits_percentage' => Metrics::getPercentVisitColumn()), 'show_exclude_low_population' => false, 'show_offset_information' => false, 'show_pagination_control' => false, diff --git a/plugins/VisitsSummary/Controller.php b/plugins/VisitsSummary/Controller.php index c67b850249..4bc553a94d 100644 --- a/plugins/VisitsSummary/Controller.php +++ b/plugins/VisitsSummary/Controller.php @@ -138,7 +138,8 @@ class Piwik_VisitsSummary_Controller extends Controller $dataTableVisit = self::getVisitsSummary(); $dataRow = $dataTableVisit->getRowsCount() == 0 ? new Row() : $dataTableVisit->getFirstRow(); - $dataTableActions = Piwik_Actions_API::getInstance()->get($idSite, Piwik_Common::getRequestVar('period'), Piwik_Common::getRequestVar('date'), Piwik_API_Request::getRawSegmentFromRequest()); + $dataTableActions = Piwik_Actions_API::getInstance()->get($idSite, Common::getRequestVar('period'), Common::getRequestVar('date'), + \Piwik\API\Request::getRawSegmentFromRequest()); $dataActionsRow = $dataTableActions->getRowsCount() == 0 ? new Row() : $dataTableActions->getFirstRow(); |