From 22f6cec9b7b9a04e61ba355730ffab9db9bc8005 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 12 Sep 2015 08:40:19 +0200 Subject: [PATCH] Yes, you see it? I got confused if it is a Plugin instance or just the plugin's name. Signed-off-by: Roland Haeder --- lib/pluginlist.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/pluginlist.php b/lib/pluginlist.php index 19825ade17..5085f161d5 100644 --- a/lib/pluginlist.php +++ b/lib/pluginlist.php @@ -45,12 +45,12 @@ require INSTALLDIR . '/lib/plugindisableform.php'; */ class PluginList extends Widget { - var $plugins = array(); + var $pluginNames = array(); - function __construct(array $plugins, Action $out=null) + function __construct(array $pluginNames, Action $out=null) { parent::__construct($out); - $this->plugins = $plugins; + $this->pluginNames = $pluginNames; } function show() @@ -72,18 +72,15 @@ class PluginList extends Widget function showPlugins() { - foreach ($this->plugins as $plugin) { - // Some check on instance - assert($plugin instanceof Plugin); - - $pli = $this->newListItem($plugin); + foreach ($this->pluginNames as $pluginName) { + $pli = $this->newListItem($pluginName); $pli->show(); } } - function newListItem(Plugin $plugin) + function newListItem($pluginName) { - return new PluginListItem($plugin, $this->out); + return new PluginListItem($pluginName, $this->out); } } -- 2.39.5