diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-07-22 10:49:54 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-07-22 10:51:00 +0400 |
commit | f6d87baf3833a00c3747cd590d83d0e499d7c94e (patch) | |
tree | 15311b6188b358427e443176b6b6694e823e70f8 /plugins/SitesManager/Menu.php | |
parent | 2949359cfb2e2718aa50236148e9f82e4787d0de (diff) |
refs #5192 simplified admin menu since it is very confusing for developers to find the correct translation key to use for menuName. Results in lots of dulicated code as well (same translation keys are mentioned everywhere). Also removed the $displayedForCurrentUsers in those methods since boolean parameters are bad practice and it did result in duplicated code as well as you had to call the same function or pass the same variable in each add() call. Moved the VisitorGenerator in a development section since it is not really diagnostic. There will be another development menu item with the next commit. Need to update ui tests
Diffstat (limited to 'plugins/SitesManager/Menu.php')
-rw-r--r-- | plugins/SitesManager/Menu.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/SitesManager/Menu.php b/plugins/SitesManager/Menu.php index a2573d1f3e..017690f442 100644 --- a/plugins/SitesManager/Menu.php +++ b/plugins/SitesManager/Menu.php @@ -15,9 +15,10 @@ class Menu extends \Piwik\Plugin\Menu { public function configureAdminMenu(MenuAdmin $menu) { - $menu->add('CoreAdminHome_MenuManage', 'SitesManager_Sites', - array('module' => 'SitesManager', 'action' => 'index'), - Piwik::isUserHasSomeAdminAccess(), - $order = 1); + if (Piwik::isUserHasSomeAdminAccess()) { + $menu->addManageItem('SitesManager_Sites', + array('module' => 'SitesManager', 'action' => 'index'), + $order = 1); + } } } |