Patch for Statistics module
Posted: Tue Apr 22, 2008 4:36 pm
Attached is a MLE patch for the Statistics module.
Regards,
Carsten
Regards,
Carsten
Content management as it is meant to be
https://forum.cmsmadesimple.org/
That's not exactly what happens. "Statistics" only count pages with their pageid, regardless if you access the Dutch or English version. And in the "Statistics" you see now the page titles according to your current language setting.Before the patch, the Current Online Visitors always calles the pages by the Dutch titles. After the patch it calles all the pages by the English title.
That would be really niceOfcourse it needs to call the pages whatever is really is
Is a diff file:requish wrote: ...and? still I dont know what should I to modify for good work module..![]()
Edit modules/Statistics/Statistics.module.php and (around 644 row) and look for signs:--- modules/Statistics/Statistics.module.php.orig 2008-04-22 17:36:43.859375000 +0100
+++ modules/Statistics/Statistics.module.php 2008-04-22 17:37:16.765625000 +0100
@@ -644,7 +644,10 @@
function InternalGetPageTitle($content_alias, $forcemenutext=false) {
$db=&$this->GetDb();
- $query="SELECT content_name,menu_text FROM ".cms_db_prefix()."content WHERE content_alias=? OR content_id=?";
+// Start MLE
+ global $mleblock;
+ $query="SELECT content_name$mleblock AS content_name,menu_text$mleblock AS menu_text FROM ".cms_db_prefix()."content WHERE content_alias=? OR content_id=?";
+// End MLE
$dbresult=$db->Execute($query,array($content_alias,$content_alias));
if (!$dbresult || $dbresult->RecordCount()==0) return "";
$row=$dbresult->FetchRow();