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:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-12-14 00:51:55 +0300
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-12-14 00:51:55 +0300
commitab847d85255c12cd697905534a00d1e47bd2db89 (patch)
treec682c1cb568b8e53b9262142cf272e927fe80c37 /plugins/Dashboard
parent7af640bfe25d3b24e90b86cc05f877634221d58b (diff)
Fixes #1069 only display on dashboard widgets that exist
Diffstat (limited to 'plugins/Dashboard')
-rw-r--r--plugins/Dashboard/Controller.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/Dashboard/Controller.php b/plugins/Dashboard/Controller.php
index 40aafc0245..11515574a3 100644
--- a/plugins/Dashboard/Controller.php
+++ b/plugins/Dashboard/Controller.php
@@ -21,12 +21,12 @@ class Piwik_Dashboard_Controller extends Piwik_Controller
$view = Piwik_View::factory($template);
$this->setGeneralVariablesView($view);
+ $view->availableWidgets = json_encode(Piwik_GetWidgetsList());
$layout = $this->getLayout();
if(empty($layout)) {
$layout = $this->getDefaultLayout();
}
$view->layout = $layout;
- $view->availableWidgets = json_encode(Piwik_GetWidgetsList());
return $view;
}
@@ -151,8 +151,9 @@ class Piwik_Dashboard_Controller extends Piwik_Controller
foreach($row as $widgetId => $widget)
{
if(isset($widget->parameters->module)) {
- $pluginName = $widget->parameters->module;
- if(!Piwik_PluginsManager::getInstance()->isPluginActivated($pluginName))
+ $controllerName = $widget->parameters->module;
+ $controllerAction = $widget->parameters->action;
+ if(!Piwik_IsWidgetDefined($controllerName, $controllerAction))
{
unset($row[$widgetId]);
}