Skip to content

Commit

Permalink
Minor refs matomo-org#472
Browse files Browse the repository at this point in the history
  • Loading branch information
mattab committed Oct 20, 2013
1 parent 099eda0 commit 15a4fc8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/Tracker/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ protected function getNameAndType()
protected function getUrlAndType()
{
$url = $this->getActionUrl();
if (!is_null($url)) {
if (!empty($url)) {
// normalize urls by stripping protocol and www
$url = PageUrl::normalizeUrl($url);
return array($url['url'], Tracker\Action::TYPE_PAGE_URL, $url['prefixId']);
Expand Down
2 changes: 2 additions & 0 deletions core/Tracker/ActionSiteSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function isSearchDetected()
}
$this->setActionName($actionName);
$this->setActionUrl($url);

return true;
}

// FIXMEA replace by getNameAndType
Expand Down
2 changes: 1 addition & 1 deletion core/Tracker/PageUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ public static function getUrlIfLookValid($url)

if (!UrlHelper::isLookLikeUrl($url)) {
Common::printDebug("WARNING: URL looks invalid and is discarded");
$url = '';
$url = false;
return $url;
}
return $url;
Expand Down
3 changes: 2 additions & 1 deletion core/Tracker/TableActionIds.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ public static function loadActionId($actionNamesAndTypes)
$actionId = Tracker::getDatabase()->lastInsertId();
Common::printDebug("Recorded a new action (" . Action::getTypeAsString($type) . ") in the lookup table: " . $name . " (idaction = " . $actionId . ")");

$actionNamesAndTypes[$actionToInsert][] = $actionId;
$keyIdAction = 3;
$actionNamesAndTypes[$actionToInsert][$keyIdAction] = $actionId;
}
return $actionNamesAndTypes;
}
Expand Down
5 changes: 5 additions & 0 deletions piwik.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@
require_once PIWIK_INCLUDE_PATH . '/core/Tracker/VisitInterface.php';
require_once PIWIK_INCLUDE_PATH . '/core/Tracker/Visit.php';
require_once PIWIK_INCLUDE_PATH . '/core/Tracker/GoalManager.php';
require_once PIWIK_INCLUDE_PATH . '/core/Tracker/PageUrl.php';
require_once PIWIK_INCLUDE_PATH . '/core/Tracker/TableActionIds.php';
require_once PIWIK_INCLUDE_PATH . '/core/Tracker/Action.php';
require_once PIWIK_INCLUDE_PATH . '/core/Tracker/ActionClickUrl.php';
require_once PIWIK_INCLUDE_PATH . '/core/Tracker/ActionPageview.php';
require_once PIWIK_INCLUDE_PATH . '/core/Tracker/ActionSiteSearch.php';
require_once PIWIK_INCLUDE_PATH . '/core/Tracker/Request.php';
require_once PIWIK_INCLUDE_PATH . '/core/Tracker/Referrer.php';
require_once PIWIK_INCLUDE_PATH . '/core/Tracker/VisitExcluded.php';
Expand Down

0 comments on commit 15a4fc8

Please sign in to comment.