diff -r f99fb84bd959 -r 7c68a18a27be plugins/SpecialAdmin.php --- a/plugins/SpecialAdmin.php Mon Aug 06 10:37:42 2007 -0400 +++ b/plugins/SpecialAdmin.php Thu Aug 09 12:26:16 2007 -0400 @@ -2,7 +2,7 @@ /* Plugin Name: Runt - the Enano administration panel Plugin URI: http://enanocms.org/ -Description: Provides the page Special:Administration, which is the AJAX frontend to the various Admin: +Description: Provides the page Special:Administration, which is the AJAX frontend to the various Admin pagelets. This plugin cannot be disabled. Author: Dan Fuhry Version: 1.0.1 Author URI: http://enanocms.org/ @@ -549,13 +549,13 @@ echo('
The demo lockdown plugin cannot be disabled in demo mode.
'); break; } - if ( $_GET['plugin'] != 'SpecialAdmin.php' ) + if ( !in_array($_GET['plugin'], $plugins->system_plugins) ) { setConfig('plugin_'.$_GET['plugin'], '0'); } else { - echo('The administration panel plugin cannot be disabled.
'); + echo('The plugin you selected cannot be disabled because it is a system plugin.
'); } break; } @@ -563,6 +563,7 @@ $dir = './plugins/'; $plugin_list = Array(); $system = Array(); + $show_system = ( isset($_GET['show_system']) && $_GET['show_system'] == 'yes' ); if (is_dir($dir)) { @@ -572,10 +573,12 @@ { if(preg_match('#^(.*?)\.php$#is', $file) && $file != 'index.php') { + unset($thelist); if ( in_array($file, $plugins->system_plugins) ) { + if ( !$show_system ) + continue; $thelist =& $system; - continue; } else { @@ -614,28 +617,48 @@ } echo('Plugin filename | Plugin name | Description | Author | Version | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
'.$plugin_files[$i].' | -'.$plugin_list[$plugin_files[$i]]['name'].' | -'.$plugin_list[$plugin_files[$i]]['desc'].' | -'.$plugin_list[$plugin_files[$i]]['auth'].' | -'.$plugin_list[$plugin_files[$i]]['vers'].' | -'; - if ( getConfig('plugin_'.$plugin_files[$i]) == '1' ) + | '.$plugin_files[$i].' | +'.$this_plugin['name'].' | +'.$this_plugin['desc'].' | +'.$this_plugin['auth'].' | +'.$this_plugin['vers'].' | +'; + if ( !in_array($plugin_files[$i], $plugins->system_plugins) ) { - echo 'Disable'; + if ( getConfig('plugin_'.$plugin_files[$i]) == '1' ) + { + echo 'Disable'; + } + else + { + echo 'Enable'; + } } else { - echo 'Enable'; + echo '[System]'; } echo ' |
'.$showhide_link.' |