1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 11:50:30 +02:00

Log counter shortcode fix when 'www.' is in the URL.

This commit is contained in:
Cameron
2015-09-23 18:19:06 -07:00
parent 8c47bee60d
commit 8b8e7b690c

View File

@@ -74,10 +74,10 @@ class log_shortcodes extends e_shortcode
function sc_log_pagecounter($parm)
{
$url = str_replace("www.", "", e_REQUEST_URL);
$id = $this->getKey(e_REQUEST_URL);
if(isset($this->dbPageInfo[$id]['url']) && ($this->dbPageInfo[$id]['url'] == e_REQUEST_URL))
if(isset($this->dbPageInfo[$id]['url']) && ($this->dbPageInfo[$id]['url'] == e_REQUEST_URL || $this->dbPageInfo[$id]['url'] == $url))
{
return ($parm == 'unique') ? number_format($this->dbPageInfo[$id]['unqv']) : number_format($this->dbPageInfo[$id]['ttlv']);
}