Fix stats page determination.
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 6 Jan 2009 19:03:11 +0000 (12:03 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 6 Jan 2009 19:03:11 +0000 (12:03 -0700)
chora/lib/Chora.php

index e179150..c7d0e8e 100644 (file)
@@ -523,7 +523,8 @@ class Chora {
             }
         }
 
-        $views[] = $current == 'stats'
+        /* Can't use $current - gives us PATH_INFO information. */
+        $views[] = (strpos($_SERVER['PHP_SELF'], '/stats.php/') !== false)
             ? '<em class="widget">' . _("Statistics") . '</em>'
             : Horde::widget(Chora::url('stats', $where), _("Statistics"),
                             'widget', '', '', _("_Statistics"));