diff options
Diffstat (limited to 'inc/template.php')
-rw-r--r-- | inc/template.php | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/inc/template.php b/inc/template.php index 518087e50..b033a82e0 100644 --- a/inc/template.php +++ b/inc/template.php @@ -129,13 +129,35 @@ function tpl_content(){ * @author Andreas Gohr <andi@splitbrain.org> */ function tpl_admin(){ + + $plugin = NULL; + if ($_REQUEST['page']) { + $pluginlist = plugin_list('admin'); + + if (in_array($_REQUEST['page'], $pluginlist)) { + + // attempt to load the plugin + $plugin =& plugin_load('admin',$_REQUEST['page']); + } + } + + if ($plugin !== NULL) + $plugin->html(); + else + html_admin(); +/* switch($_REQUEST['page']){ - case 'acl': - admin_acl_html(); - break; + case 'acl': + admin_acl_html(); + break; + case 'plugin': + require_once(DOKU_INC.'inc/admin_plugin.php'); + admin_plugin_html(); + break; default: - html_admin(); - } + html_admin(); + } +*/ } /** |