From 8b8e7b690c4e308de2a3a4bb40ff749ca6333cef Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 23 Sep 2015 18:19:06 -0700 Subject: [PATCH] Log counter shortcode fix when 'www.' is in the URL. --- e107_plugins/log/e_shortcode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e107_plugins/log/e_shortcode.php b/e107_plugins/log/e_shortcode.php index ea971f114..84a2151dc 100644 --- a/e107_plugins/log/e_shortcode.php +++ b/e107_plugins/log/e_shortcode.php @@ -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']); }