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:
Diffstat (limited to 'core/PluginsFunctions/WidgetsList.php')
-rw-r--r--core/PluginsFunctions/WidgetsList.php33
1 files changed, 1 insertions, 32 deletions
diff --git a/core/PluginsFunctions/WidgetsList.php b/core/PluginsFunctions/WidgetsList.php
index 1ab172a645..ce1b7a417f 100644
--- a/core/PluginsFunctions/WidgetsList.php
+++ b/core/PluginsFunctions/WidgetsList.php
@@ -16,15 +16,10 @@
class Piwik_WidgetsList
{
static protected $widgets = null;
- static protected $hookCalled = false;
static function get()
{
- if(!self::$hookCalled)
- {
- self::$hookCalled = true;
- Piwik_PostEvent('WidgetsList.add');
- }
+ Piwik_PostEvent('WidgetsList.add');
return self::$widgets;
}
@@ -33,10 +28,6 @@ class Piwik_WidgetsList
$widgetCategory = Piwik_Translate($widgetCategory);
$widgetName = Piwik_Translate($widgetName);
$widgetUniqueId = 'widget' . $controllerName . $controllerAction;
- foreach($customParameters as $name => $value)
- {
- $widgetUniqueId .= $name . $value;
- }
self::$widgets[$widgetCategory][] = array(
'name' => $widgetName,
'uniqueId' => $widgetUniqueId,
@@ -45,23 +36,6 @@ class Piwik_WidgetsList
) + $customParameters
);
}
-
- static function isDefined($controllerName, $controllerAction)
- {
- $widgetsList = self::get();
- foreach($widgetsList as $widgetCategory => $widgets)
- {
- foreach($widgets as $widget)
- {
- if($widget['parameters']['module'] == $controllerName
- && $widget['parameters']['action'] == $controllerAction)
- {
- return true;
- }
- }
- }
- return false;
- }
}
function Piwik_GetWidgetsList()
@@ -73,8 +47,3 @@ function Piwik_AddWidget( $widgetCategory, $widgetName, $controllerName, $contro
{
Piwik_WidgetsList::add($widgetCategory, $widgetName, $controllerName, $controllerAction, $customParameters);
}
-
-function Piwik_IsWidgetDefined($controllerName, $controllerAction)
-{
- return Piwik_WidgetsList::isDefined($controllerName, $controllerAction);
-}