From a611fedd96c0bea49710a36c0e3614082b2362da Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 21 Jan 2016 14:01:28 -0800 Subject: [PATCH] Fix for multi-language domain key detection. --- e107_plugins/log/consolidate.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/e107_plugins/log/consolidate.php b/e107_plugins/log/consolidate.php index 701ad8440..73b2f3c04 100644 --- a/e107_plugins/log/consolidate.php +++ b/e107_plugins/log/consolidate.php @@ -440,13 +440,20 @@ class logConsolidate { $pageDisallow = "cache|file|eself|admin"; $tagRemove = "(\\\)|(\s)|(\')|(\")|(eself)|( )|(\.php)|(\.html)"; - // $tagRemove2 = "(\\\)|(\s)|(\')|(\")|(eself)|( )"; // preg_match("#/(.*?)(\?|$)(.*)#si", $url, $match); // $match[1] = isset($match[1]) ? $match[1] : ''; // $pageName = substr($match[1], (strrpos($match[1], "/")+1)); - $pageName = str_replace(SITEURL,'',$url); + if(deftrue('e_DOMAIN')) + { + list($discard,$pageName) = explode(e_DOMAIN.'/',$url); // everything after the domain. + } + else // eg. local setup. + { + $pageName = str_replace(SITEURL,'',$url); + } + $pageName = urldecode($pageName); $pageName = preg_replace("/".$tagRemove."/si", "", $pageName);