diff --git a/plugins/Actions/API.php b/plugins/Actions/API.php index 37a38153944f3f9789e4f3260add3b8c16e28f95..2f0b8f5f9da2a79fb268816dfe2e94e2726e93dc 100644 --- a/plugins/Actions/API.php +++ b/plugins/Actions/API.php @@ -14,7 +14,7 @@ use Piwik\Archive; use Piwik\Common; use Piwik\DataTable; use Piwik\Date; -use Piwik\Metrics; +use Piwik\Metrics as PiwikMetrics; use Piwik\Piwik; use Piwik\Plugin\Report; use Piwik\Plugins\Actions\Columns\Metrics\AveragePageGenerationTime; @@ -247,7 +247,7 @@ class API extends \Piwik\Plugin\API public function getSiteSearchKeywords($idSite, $period, $date, $segment = false) { $dataTable = $this->getSiteSearchKeywordsRaw($idSite, $period, $date, $segment); - $dataTable->deleteColumn(Metrics::INDEX_SITE_SEARCH_HAS_NO_RESULT); + $dataTable->deleteColumn(PiwikMetrics::INDEX_SITE_SEARCH_HAS_NO_RESULT); $this->filterActionsDataTable($dataTable); $this->addPagesPerSearchColumn($dataTable); return $dataTable; @@ -276,13 +276,13 @@ class API extends \Piwik\Plugin\API // Delete all rows that have some results $dataTable->filter('ColumnCallbackDeleteRow', array( - Metrics::INDEX_SITE_SEARCH_HAS_NO_RESULT, + PiwikMetrics::INDEX_SITE_SEARCH_HAS_NO_RESULT, function ($value) { return $value < 1; } )); $dataTable->deleteRow(DataTable::ID_SUMMARY_ROW); - $dataTable->deleteColumn(Metrics::INDEX_SITE_SEARCH_HAS_NO_RESULT); + $dataTable->deleteColumn(PiwikMetrics::INDEX_SITE_SEARCH_HAS_NO_RESULT); $this->filterActionsDataTable($dataTable); $this->addPagesPerSearchColumn($dataTable); return $dataTable; diff --git a/plugins/Actions/Metrics.php b/plugins/Actions/Metrics.php index 9c24962e997bd9ba2f62f76b7d362a5bc73278bc..83b1c7370aeecb2270ac338f96e07ddd17282191 100644 --- a/plugins/Actions/Metrics.php +++ b/plugins/Actions/Metrics.php @@ -21,22 +21,6 @@ use Piwik\Plugins\Actions\Actions\ActionSiteSearch; */ class Metrics { - const DOWNLOADS_RECORD_NAME = 'Actions_downloads'; - const OUTLINKS_RECORD_NAME = 'Actions_outlink'; - const PAGE_TITLES_RECORD_NAME = 'Actions_actions'; - const SITE_SEARCH_RECORD_NAME = 'Actions_sitesearch'; - const PAGE_URLS_RECORD_NAME = 'Actions_actions_url'; - - const METRIC_PAGEVIEWS_RECORD_NAME = 'Actions_nb_pageviews'; - const METRIC_UNIQ_PAGEVIEWS_RECORD_NAME = 'Actions_nb_uniq_pageviews'; - const METRIC_SUM_TIME_RECORD_NAME = 'Actions_sum_time_generation'; - const METRIC_HITS_TIMED_RECORD_NAME = 'Actions_nb_hits_with_time_generation'; - const METRIC_DOWNLOADS_RECORD_NAME = 'Actions_nb_downloads'; - const METRIC_UNIQ_DOWNLOADS_RECORD_NAME = 'Actions_nb_uniq_downloads'; - const METRIC_OUTLINKS_RECORD_NAME = 'Actions_nb_outlinks'; - const METRIC_UNIQ_OUTLINKS_RECORD_NAME = 'Actions_nb_uniq_outlinks'; - const METRIC_SEARCHES_RECORD_NAME = 'Actions_nb_searches'; - const METRIC_KEYWORDS_RECORD_NAME = 'Actions_nb_keywords'; public static $actionTypes = array( Action::TYPE_PAGE_URL, diff --git a/tests/LocalTracker.php b/tests/LocalTracker.php index 98ef3e65019c37b93dbb2b50f0338c9de5dc46b2..6e251e6d21acbf2e995c8aee7c71c663002e217c 100755 --- a/tests/LocalTracker.php +++ b/tests/LocalTracker.php @@ -21,6 +21,10 @@ class Piwik_LocalTracker extends PiwikTracker { protected function sendRequest($url, $method = 'GET', $data = null, $force = false) { + if ($this->DEBUG_APPEND_URL) { + $url .= $this->DEBUG_APPEND_URL; + } + // if doing a bulk request, store the url if ($this->doBulkRequests && !$force) { $this->storedTrackingActions[] = $url;