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
diff options
context:
space:
mode:
authorrobocoder <anthon.pang@gmail.com>2009-10-10 12:17:45 +0400
committerrobocoder <anthon.pang@gmail.com>2009-10-10 12:17:45 +0400
commit09cd8906bed67454524e3e598878279b12ff48f1 (patch)
treeb4b671eeb876cc45b944e151401f05ed356ada17 /core/SmartyPlugins
parent074469e4f3e6b853d4db92de5a49a242dfddba59 (diff)
fixes #999, refs #677 - suppress top bar nav links for disabled plugins
git-svn-id: http://dev.piwik.org/svn/trunk@1486 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/SmartyPlugins')
-rw-r--r--core/SmartyPlugins/function.assignTopBar.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/core/SmartyPlugins/function.assignTopBar.php b/core/SmartyPlugins/function.assignTopBar.php
index 1f1c451bbd..4d5beb44fc 100644
--- a/core/SmartyPlugins/function.assignTopBar.php
+++ b/core/SmartyPlugins/function.assignTopBar.php
@@ -19,11 +19,21 @@
*/
function smarty_function_assignTopBar($params, &$smarty)
{
- $topBarElements = array(
+ $topBarElements = array();
+ $elements = array(
array('CoreHome', Piwik_Translate('General_YourDashboard'), array('module' => 'CoreHome', 'action' => 'index')),
array('Widgetize', Piwik_Translate('General_Widgets'), array('module' => 'Widgetize', 'action' => 'index')),
array('API', Piwik_Translate('General_API'), array('module' => 'API', 'action' => 'listAllAPI')),
array('Feedback', Piwik_Translate('General_GiveUsYourFeedback'), array('module' => 'Feedback', 'action' => 'index', 'keepThis' => 'true', 'TB_iframe' => 'true', 'height' => '400', 'width' => '350'), 'title="'.Piwik_Translate('General_GiveUsYourFeedback').'" class="thickbox"'),
);
+
+ foreach($elements as $element)
+ {
+ if(Piwik_PluginsManager::getInstance()->isPluginActivated($element[0]))
+ {
+ $topBarElements[] = $element;
+ }
+ }
+
$smarty->assign("topBarElements", $topBarElements);
}