diff options
Diffstat (limited to 'lib/pluginlist.php')
-rw-r--r-- | lib/pluginlist.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/pluginlist.php b/lib/pluginlist.php index 07a17ba39..0e1a81249 100644 --- a/lib/pluginlist.php +++ b/lib/pluginlist.php @@ -154,11 +154,13 @@ class PluginListItem extends Widget */ protected function getControlForm() { - $key = 'disable-' . $this->plugin; - if (common_config('plugins', $key)) { - return new PluginEnableForm($this->out, $this->plugin); - } else { + $enabled = array_key_exists($this->plugin, StatusNet::getPlugins()); + $disabled = common_config('plugins', 'disable-'.$this->plugin); + + if ( $enabled && (!$disabled) ) { // then return new PluginDisableForm($this->out, $this->plugin); + } else { + return new PluginEnableForm($this->out, $this->plugin); } } @@ -204,8 +206,7 @@ class PluginListItem extends Widget protected static function getPluginVersions() { if (!is_array(self::$versions)) { - $versions = array(); - Event::handle('PluginVersion', array(&$versions)); + $versions = common_plugindata(); self::$versions = $versions; } return self::$versions; |