From: Roland Haeder Date: Sat, 12 Sep 2015 06:40:19 +0000 (+0200) Subject: Yes, you see it? I got confused if it is a Plugin instance or just the plugin's name. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=22f6cec9b7b9a04e61ba355730ffab9db9bc8005;p=quix0rs-gnu-social.git Yes, you see it? I got confused if it is a Plugin instance or just the plugin's name. Signed-off-by: Roland Haeder --- 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); } }