From 3d729ef502710ccd49863e3c916ebccde7714fa5 Mon Sep 17 00:00:00 2001 From: mattab Date: Tue, 22 Oct 2013 17:22:42 +1300 Subject: [PATCH] Removing broken config setting for Transitions --- config/global.ini.php | 5 ----- core/Tracker/Action.php | 19 +++++++++++++++---- core/Tracker/ActionSiteSearch.php | 10 +--------- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/config/global.ini.php b/config/global.ini.php index a058376e4e1..40fe1413386 100644 --- a/config/global.ini.php +++ b/config/global.ini.php @@ -405,11 +405,6 @@ ; maximum length of a Page Title or a Page URL recorded in the log_action.name table page_maximum_length = 1024; -; By default, when a request is identified as a "Internal Site Search", the URL will not be recorded. This is for performance reasons -; (the less unique URLs in Piwik the better). Piwik will track, for each Site Search: "Search Keyword", -; and optionally the "Search Category" and "Search result count". You can set this to 1 to enable tracking Site Search URLs. -action_sitesearch_record_url = 0 - ; Anonymize a visitor's IP address after testing for "Ip exclude" ; This value is the level of anonymization Piwik will use; if the AnonymizeIP plugin is deactivated, this value is ignored. ; For IPv4/IPv6 addresses, valid values are the number of octets in IP address to mask (from 0 to 4). diff --git a/core/Tracker/Action.php b/core/Tracker/Action.php index c26e75bd7f4..a537c34a590 100644 --- a/core/Tracker/Action.php +++ b/core/Tracker/Action.php @@ -180,6 +180,17 @@ public function getIdActionUrl() return (int)$idUrl; } + + public function getIdActionUrlForEntryAndExitIds() + { + return $this->getIdActionUrl(); + } + + public function getIdActionNameForEntryAndExitIds() + { + return $this->getIdActionName(); + } + public function getIdActionName() { if(!isset($this->actionIdsCached['idaction_name'])) { @@ -294,9 +305,9 @@ public function record($idVisit, $visitorIdCookie, $idReferrerActionUrl, $idRefe $insert = array_merge($insert, $customVariables); - $fields = implode(", ", array_keys($insertWithoutNulls)); - $bind = array_values($insertWithoutNulls); - $values = Common::getSqlStringFieldsArray($insertWithoutNulls); + $fields = implode(", ", array_keys($insert)); + $bind = array_values($insert); + $values = Common::getSqlStringFieldsArray($insert); $sql = "INSERT INTO " . Common::prefixTable('log_link_visit_action') . " ($fields) VALUES ($values)"; Tracker::getDatabase()->query($sql, $bind); @@ -312,7 +323,7 @@ public function record($idVisit, $visitorIdCookie, $idReferrerActionUrl, $idRefe 'timeSpentReferrerAction' => $timeSpentReferrerAction, ); Common::printDebug("Inserted new action:"); - Common::printDebug($insertWithoutNulls); + Common::printDebug($insert); /** * This hook is called after saving (and updating) visitor information. You can use it for instance to sync the diff --git a/core/Tracker/ActionSiteSearch.php b/core/Tracker/ActionSiteSearch.php index 9822bfb585d..1d7e57ddcc1 100644 --- a/core/Tracker/ActionSiteSearch.php +++ b/core/Tracker/ActionSiteSearch.php @@ -45,7 +45,6 @@ protected function getActionsToLookup() { return array( 'idaction_name' => array($this->getActionName(), Action::TYPE_SITE_SEARCH), - 'idaction_url' => $this->getUrlAndType(), ); } @@ -53,10 +52,7 @@ public function getIdActionUrl() { // Site Search, by default, will not track URL. We do not want URL to appear as "Page URL not defined" // so we specifically set it to NULL in the table (the archiving query does IS NOT NULL) - if (empty(Config::getInstance()->Tracker['action_sitesearch_record_url'])) { - return null; - } - return parent::getIdActionUrl(); + return null; } public function getCustomFloatValue() @@ -197,7 +193,6 @@ protected function detectSiteSearch($originalUrl) } $actionName = $url = $categoryName = $count = false; - $doTrackUrlForSiteSearch = !empty(Config::getInstance()->Tracker['action_sitesearch_record_url']); $originalUrl = PageUrl::cleanupUrl($originalUrl); @@ -205,9 +200,6 @@ protected function detectSiteSearch($originalUrl) $searchKwd = $this->request->getParam('search'); if (!empty($searchKwd)) { $actionName = $searchKwd; - if ($doTrackUrlForSiteSearch) { - $url = $originalUrl; - } $isCategoryName = $this->request->getParam('search_cat'); if (!empty($isCategoryName)) { $categoryName = $isCategoryName;