config plugin update & removal of $conf['pluginmanager'] option

darcs-hash:20060126011342-9b6ab-40d04573bef34fa4012edac74186355b9a7ff0d9.gz
This commit is contained in:
chris 2006-01-26 02:13:42 +01:00
parent e77ea1bc9d
commit 20e7ccb0f1
6 changed files with 15 additions and 71 deletions

View File

@ -77,7 +77,6 @@ $conf['gdlib'] = 2; //the GDlib version (0, 1 or 2) 2 tries
$conf['im_convert'] = ''; //path to ImageMagicks convert (will be used instead of GD)
$conf['spellchecker']= 0; //enable Spellchecker (needs PHP >= 4.3.0 and aspell installed)
$conf['subscribers'] = 0; //enable change notice subscription support
$conf['pluginmanager'] = 0; //enable automated plugin management (requires plugin)
$conf['compress'] = 1; //Strip whitespaces and comments from Styles and JavaScript? 1|0
$conf['hidepages'] = ''; //Regexp for pages to be skipped from RSS, Search and Recent Changes
$conf['send404'] = 0; //Send a HTTP 404 status for non existing pages?

View File

@ -6,51 +6,6 @@
* @author Andreas Gohr <andi@splitbrain.org>
*/
/**
* prints needed HTML to include plugin CSS and JS files
*
* @deprecated - now handled by the style and script loader in lib/exe
*/
function plugin_printCSSJS(){
global $conf;
if (isset($conf['pluginmanager']) && $conf['pluginmanager'] &&
// implicit check that plugin manager has setup the aggregated files - it has styles of its own
@file_exists(DOKU_INC.'lib/plugins/plugin_style.css')) {
// individual plugin instances of the files swept into one file each
$dir = "lib/plugins/plugin_";
if(@file_exists(DOKU_INC.$dir.'style.css')){
print ' <link rel="stylesheet" type="text/css" href="'.DOKU_BASE.$dir.'style.css" />'."\n";
}
if(@file_exists(DOKU_INC.$dir.'screen.css')){
print ' <link rel="stylesheet" media="screen" type="text/css" href="'.DOKU_BASE.$dir.'screen.css" />'."\n";
}
if(@file_exists(DOKU_INC.$dir.'print.css')){
print ' <link rel="stylesheet" media="print" type="text/css" href="'.DOKU_BASE.$dir.'print.css" />'."\n";
}
if(@file_exists(DOKU_INC.$dir.'script.js')){
print ' <script type="text/javascript" charset="utf-8" src="'.DOKU_BASE.$dir.'script.js"></script>'."\n";
}
} else {
// no plugin manager (or aggregate files not setup) so individual instances of these files for any plugin that uses them
$plugins = plugin_list();
foreach ($plugins as $p){
$dir = "lib/plugins/$p/";
if(@file_exists(DOKU_INC.$dir.'style.css')){
print ' <link rel="stylesheet" type="text/css" href="'.DOKU_BASE.$dir.'style.css" />'."\n";
}
if(@file_exists(DOKU_INC.$dir.'screen.css')){
print ' <link rel="stylesheet" media="screen" type="text/css" href="'.DOKU_BASE.$dir.'screen.css" />'."\n";
}
if(@file_exists(DOKU_INC.$dir.'print.css')){
print ' <link rel="stylesheet" media="print" type="text/css" href="'.DOKU_BASE.$dir.'print.css" />'."\n";
}
if(@file_exists(DOKU_INC.$dir.'script.js')){
print ' <script type="text/javascript" charset="utf-8" src="'.DOKU_BASE.$dir.'script.js"></script>'."\n";
}
}
}
}
/**
* Returns a list of available plugins of given type

View File

@ -47,10 +47,11 @@ $lang['deaccent'] = 'deaccent in pagenames'; //convert accented chars to u
$lang['useheading'] = 'use first heading'; //use the first heading in a page as its name
$lang['refcheck'] = 'media reference check'; //check for references before deleting media files
$lang['refshow'] = 'media references to show'; //how many references should be shown, 5 is a good value
$lang['allowdebug'] = 'allow debug (disable!)'; //make debug possible, disable after install! 0|1
$lang['usewordblock']= 'block spam based on words'; //block spam based on words? 0|1
$lang['indexdelay'] = 'time delay before indexing'; //allow indexing after this time (seconds) default is 5 days
$lang['relnofollow'] = 'use rel no follow'; //use rel="nofollow" for external links?
$lang['relnofollow'] = 'use rel="nofollow"'; //use rel="nofollow" for external links?
$lang['mailguard'] = 'obfuscate email addresses'; //obfuscate email addresses against spam harvesters?
/* Authentication Options - read http://www.splitbrain.org/dokuwiki/wiki:acl */
@ -79,7 +80,6 @@ $lang['gdlib'] = 'GD Lib version'; //the GDlib version (0, 1
$lang['im_convert'] = 'imagemagick path'; //path to ImageMagicks convert (will be used instead of GD)
$lang['spellchecker']= 'enable spellchecker'; //enable Spellchecker (needs PHP >= 4.3.0 and aspell installed)
$lang['subscribers'] = 'enable subscription support'; //enable change notice subscription support
$lang['pluginmanager'] = 'enable plugin manager'; //enable automated plugin management (requires plugin)
$lang['compress'] = 'Compress CSS & javascript files'; //Strip whitespaces and comments from Styles and JavaScript? 1|0
$lang['hidepages'] = 'Hide matching pages (regex)'; //Regexp for pages to be skipped from RSS, Search and Recent Changes
$lang['send404'] = 'Send "HTTP404/Page Not Found"'; //Send a HTTP 404 status for non existing pages?
@ -116,7 +116,7 @@ $lang['userewrite_o_1'] = 'htaccess';
$lang['userewrite_o_2'] = 'dokuwiki';
/* gdlib options */
$lang['gdlib_o_0'] = 'version 0.x';
$lang['gdlib_o_0'] = 'GD Lib not available';
$lang['gdlib_o_1'] = 'version 1.x';
$lang['gdlib_o_2'] = 'autodetect';

View File

@ -93,6 +93,7 @@ $meta['deaccent'] = array('onoff');
$meta['useheading'] = array('onoff');
$meta['refcheck'] = array('onoff');
$meta['refshow'] = array('numeric');
$meta['allowdebug'] = array('onoff');
$meta['usewordblock']= array('onoff');
$meta['indexdelay'] = array('numeric');
@ -123,7 +124,6 @@ $meta['gdlib'] = array('multichoice','_choices' => array(0,1,2));
$meta['im_convert'] = array('im_convert');
$meta['spellchecker']= array('onoff');
$meta['subscribers'] = array('onoff');
$meta['pluginmanager'] = array('onoff');
$meta['compress'] = array('onoff');
$meta['hidepages'] = array('');
$meta['send404'] = array('onoff');

View File

@ -40,28 +40,18 @@ if (!class_exists('setting_savedir')) {
}
if (!class_exists('setting_authtype')) {
class setting_authtype extends setting {
var $_pattern = '#^[a-zA-Z0-9_]*$#';
class setting_authtype extends setting_multichoice {
function update($input) {
if ($this->is_protected()) return false;
$input = trim($input);
$value = is_null($this->_local) ? $this->_default : $this->_local;
if ($value == $input) return false;
function initialize($default,$local,$protected) {
if (preg_match($this->_pattern, $input)) {
if (@file_exists(DOKU_INC.'inc/auth/'.$input.'.class.php') ||
@file_exists(DOKU_INC.'inc/auth/'.$input.'.php')) {
$this->_local = $input;
return true;
}
}
$this->_error = true;
$this->_input = $input;
return false;
// populate $this->_choices with a list of available auth mechanisms
$authtypes = glob(DOKU_INC.'inc/auth/*.class.php');
$authtypes = preg_replace('#^.*/([^/]*)\.class\.php$#i','$1', $authtypes);
sort($authtypes);
$this->_choices = $authtypes;
parent::initialize($default,$local,$protected);
}
}
}

View File

@ -40,7 +40,7 @@ class admin_plugin_plugin extends DokuWiki_Admin_Plugin {
function admin_plugin_plugin() {
global $conf;
$this->disabled = (!isset($conf['pluginmanager']) || ($conf['pluginmanager'] == 0));
$this->disabled = (isset($conf['pluginmanager']) && ($conf['pluginmanager'] == 0));
}
/**