diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-10-20 07:54:21 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-10-20 07:54:21 +0400 |
commit | ed9cd9eb2bd61b2db833092f31606fe68d7ae396 (patch) | |
tree | 2633315e7e020456aa16dd1ad80c1824cd5b82b9 /plugins/Actions/API.php | |
parent | cab7c1472b7c135314d4da7b1055af25ff7f0009 (diff) |
Some refactoring and preparations for custom events ref #472
PHP Tracker and Tests fixtures
Schema updates
Diffstat (limited to 'plugins/Actions/API.php')
-rw-r--r-- | plugins/Actions/API.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/Actions/API.php b/plugins/Actions/API.php index 84ceca80ac..1251073d94 100644 --- a/plugins/Actions/API.php +++ b/plugins/Actions/API.php @@ -14,13 +14,14 @@ use Exception; use Piwik\Archive; use Piwik\Common; use Piwik\DataTable; -use Piwik\Date; +use Piwik\Date; use Piwik\Metrics; -use Piwik\Piwik; +use Piwik\Piwik; use Piwik\Plugins\CustomVariables\API as APICustomVariables; use Piwik\Tracker\Action; +use Piwik\Tracker\PageUrl; /** * The Actions API lets you request reports for all your Visitor Actions: Page URLs, Page titles (Piwik Events), @@ -199,7 +200,7 @@ class API extends \Piwik\Plugin\API public function getPageUrl($pageUrl, $idSite, $period, $date, $segment = false) { $callBackParameters = array('Actions_actions_url', $idSite, $period, $date, $segment, $expanded = false, $idSubtable = false); - $dataTable = $this->getFilterPageDatatableSearch($callBackParameters, $pageUrl, Action::TYPE_ACTION_URL); + $dataTable = $this->getFilterPageDatatableSearch($callBackParameters, $pageUrl, Action::TYPE_PAGE_URL); $this->filterPageDatatable($dataTable); $this->filterActionsDataTable($dataTable); return $dataTable; @@ -240,7 +241,7 @@ class API extends \Piwik\Plugin\API public function getPageTitle($pageName, $idSite, $period, $date, $segment = false) { $callBackParameters = array('Actions_actions', $idSite, $period, $date, $segment, $expanded = false, $idSubtable = false); - $dataTable = $this->getFilterPageDatatableSearch($callBackParameters, $pageName, Action::TYPE_ACTION_NAME); + $dataTable = $this->getFilterPageDatatableSearch($callBackParameters, $pageName, Action::TYPE_PAGE_TITLE); $this->filterPageDatatable($dataTable); $this->filterActionsDataTable($dataTable); return $dataTable; @@ -378,12 +379,12 @@ class API extends \Piwik\Plugin\API { if ($searchTree === false) { // build the query parts that are searched inside the tree - if ($actionType == Action::TYPE_ACTION_NAME) { + if ($actionType == Action::TYPE_PAGE_TITLE) { $searchedString = Common::unsanitizeInputValue($search); } else { $idSite = $callBackParameters[1]; try { - $searchedString = Action::excludeQueryParametersFromUrl($search, $idSite); + $searchedString = PageUrl::excludeQueryParametersFromUrl($search, $idSite); } catch (Exception $e) { $searchedString = $search; } |