Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core/Menu
diff options
context:
space:
mode:
authorbenakamoorthi <benaka.moorthi@gmail.com>2012-12-15 09:03:24 +0400
committerbenakamoorthi <benaka.moorthi@gmail.com>2012-12-15 09:03:24 +0400
commitc8bfe5178d9f9a46069316d10ef12de6dfb8037b (patch)
tree93237712c9107c6c992b69a9ba4b0b47acc8005d /core/Menu
parent524686f0b0d1dfc2a589a1acc17d6e70d4b8cc8b (diff)
Fixes #3426, make sure idSite in Piwik menu is always numeric.
git-svn-id: http://dev.piwik.org/svn/trunk@7631 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/Menu')
-rw-r--r--core/Menu/Abstract.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/Menu/Abstract.php b/core/Menu/Abstract.php
index 31da83fab9..14fa8527e7 100644
--- a/core/Menu/Abstract.php
+++ b/core/Menu/Abstract.php
@@ -55,6 +55,12 @@ abstract class Piwik_Menu_Abstract
{
if($displayedForCurrentUser)
{
+ // make sure the idSite value used is numeric (hack-y fix for #3426)
+ if (!is_numeric(Piwik_Common::getRequestVar('idSite', false)))
+ {
+ $url['idSite'] = reset(Piwik_SitesManager_API::getInstance()->getSitesIdWithAtLeastViewAccess());
+ }
+
$this->menuEntries[] = array(
$menuName,
$subMenuName,