Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-07-23 04:32:45 +0400
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-07-23 04:32:45 +0400
commit8fe551e0ce64c200674a2116b763870b51cbb106 (patch)
tree58d19fd43eb323316d20cd0268fba41e2716add4
parent9d44ebafb3c58838c8fba8d81dc96196a4d819ed (diff)
- fixing one more bug in referer detection
-rw-r--r--modules/LogStats/Visit.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/LogStats/Visit.php b/modules/LogStats/Visit.php
index ddc48dbd3f..0ff18389f1 100644
--- a/modules/LogStats/Visit.php
+++ b/modules/LogStats/Visit.php
@@ -607,6 +607,7 @@ class Piwik_LogStats_Visit implements Piwik_LogStats_Visit_Interface
$this->typeRefererAnalyzed = Piwik_Common::REFERER_TYPE_DIRECT_ENTRY;
$this->nameRefererAnalyzed = '';
$this->keywordRefererAnalyzed = '';
+ $this->refererHost = '';
// get the urls and parse them
$refererUrl = Piwik_Common::getRequestVar( 'urlref', '', 'string');
@@ -614,7 +615,10 @@ class Piwik_LogStats_Visit implements Piwik_LogStats_Visit_Interface
$this->refererUrlParse = @parse_url($refererUrl);
$this->currentUrlParse = @parse_url($currentUrl);
- $this->refererHost = $this->refererUrlParse['host'];
+ if(isset($this->refererUrlParse['host']))
+ {
+ $this->refererHost = $this->refererUrlParse['host'];
+ }
$refererDetected = false;
if( !empty($this->currentUrlParse['host']))
@@ -637,7 +641,8 @@ class Piwik_LogStats_Visit implements Piwik_LogStats_Visit_Interface
}
}
- if(!$refererDetected)
+ if(!empty($this->refererHost)
+ && !$refererDetected)
{
$this->typeRefererAnalyzed = Piwik_Common::REFERER_TYPE_WEBSITE;
$this->nameRefererAnalyzed = $this->refererHost;
@@ -794,11 +799,10 @@ class Piwik_LogStats_Visit implements Piwik_LogStats_Visit_Interface
if(isset($this->currentUrlParse['host']))
{
$currentHost = $this->currentUrlParse['host'];
-
+
if($currentHost == $this->refererHost)
{
$this->typeRefererAnalyzed = Piwik_Common::REFERER_TYPE_DIRECT_ENTRY;
-
return true;
}
}