summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2010-11-21 00:37:54 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2010-11-21 00:37:54 -0500
commitd6877baca9b8c56ce3e1565791fa260cdc983d95 (patch)
tree8107511c9c449680af10b00cf5cbd845e3f63717 /actions
parent3a336843e1cdd340dd3630747b3e6265b6effa39 (diff)
Load data for all plugins on plugin management page.
include.php: file to include to make creation of entry points easy index.php: move most of this file into include.php (and include it) plugindata.php: a separate entry point using include.php; load ALL plugins found, and write data gathered to plugindata.out.php .gitignore: add plugindata.out.php actions/pluginsadminpanel.php: * use plugindata.out.php's common_plugindata() instead of StatusNet::getPlugins() * give a button linking to plugindata.php, to refresh plugin data lib/pluginlist.php: * use plugindata.out.php's common_plugindata() instead of thowing the 'PluginVersion' event to currently enabled plugins * for the enable/disable forms: was: if (!$disabled) now: if ($enabled && (!$disabled)) lib/statusnet.php: move the list of filenames for a plugin into it's own public static function; this is used by plugindata.php
Diffstat (limited to 'actions')
-rw-r--r--actions/pluginsadminpanel.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/actions/pluginsadminpanel.php b/actions/pluginsadminpanel.php
index c1f4fe253..db76e6b3d 100644
--- a/actions/pluginsadminpanel.php
+++ b/actions/pluginsadminpanel.php
@@ -67,7 +67,10 @@ class PluginsadminpanelAction extends AdminPanelAction
// TRANS: Instructions at top of plugin admin page.
return _('Additional plugins can be enabled and configured manually. ' .
'See the <a href="http://status.net/wiki/Plugins">online plugin ' .
- 'documentation</a> for more details.');
+ 'documentation</a> for more details.').
+ '<form action="'.common_config('site','path').'/plugindata.php">'.
+ '<input type="submit" value="'._('Refresh Plugin Data').'" />'.
+ '</form>';
}
/**
@@ -83,19 +86,18 @@ class PluginsadminpanelAction extends AdminPanelAction
// TRANS: Admin form section header
$this->element('legend', null, _('Default plugins'), 'default');
- $this->showDefaultPlugins();
+ $this->showPlugins();
$this->elementEnd('fieldset');
}
/**
- * Until we have a general plugin metadata infrastructure, for now
- * we'll just list up the ones we know from the global default
- * plugins list.
+ * Show a list of all plugins listed in 'plugindata.out.php'
*/
- protected function showDefaultPlugins()
+ protected function showPlugins()
{
- $plugins = array_keys(StatusNet::getPlugins());
+ require_once INSTALLDIR.'/plugindata.out.php';
+ $plugins = array_keys(common_plugindata());
natsort($plugins);
if ($plugins) {
@@ -103,8 +105,7 @@ class PluginsadminpanelAction extends AdminPanelAction
$list->show();
} else {
$this->element('p', null,
- _('All default plugins have been disabled from the ' .
- 'site\'s configuration file.'));
+ _('No plugins found.'));
}
}
}