Skip to content
Snippets Groups Projects
Commit 20e7ccb0 authored by chris's avatar chris
Browse files

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

darcs-hash:20060126011342-9b6ab-40d04573bef34fa4012edac74186355b9a7ff0d9.gz
parent e77ea1bc
No related branches found
No related tags found
No related merge requests found
...@@ -77,7 +77,6 @@ $conf['gdlib'] = 2; //the GDlib version (0, 1 or 2) 2 tries ...@@ -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['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['spellchecker']= 0; //enable Spellchecker (needs PHP >= 4.3.0 and aspell installed)
$conf['subscribers'] = 0; //enable change notice subscription support $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['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['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? $conf['send404'] = 0; //Send a HTTP 404 status for non existing pages?
......
...@@ -6,51 +6,6 @@ ...@@ -6,51 +6,6 @@
* @author Andreas Gohr <andi@splitbrain.org> * @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 * Returns a list of available plugins of given type
......
...@@ -47,10 +47,11 @@ $lang['deaccent'] = 'deaccent in pagenames'; //convert accented chars to u ...@@ -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['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['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['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['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['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? $lang['mailguard'] = 'obfuscate email addresses'; //obfuscate email addresses against spam harvesters?
/* Authentication Options - read http://www.splitbrain.org/dokuwiki/wiki:acl */ /* Authentication Options - read http://www.splitbrain.org/dokuwiki/wiki:acl */
...@@ -79,7 +80,6 @@ $lang['gdlib'] = 'GD Lib version'; //the GDlib version (0, 1 ...@@ -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['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['spellchecker']= 'enable spellchecker'; //enable Spellchecker (needs PHP >= 4.3.0 and aspell installed)
$lang['subscribers'] = 'enable subscription support'; //enable change notice subscription support $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['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['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? $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'; ...@@ -116,7 +116,7 @@ $lang['userewrite_o_1'] = 'htaccess';
$lang['userewrite_o_2'] = 'dokuwiki'; $lang['userewrite_o_2'] = 'dokuwiki';
/* gdlib options */ /* 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_1'] = 'version 1.x';
$lang['gdlib_o_2'] = 'autodetect'; $lang['gdlib_o_2'] = 'autodetect';
......
...@@ -93,6 +93,7 @@ $meta['deaccent'] = array('onoff'); ...@@ -93,6 +93,7 @@ $meta['deaccent'] = array('onoff');
$meta['useheading'] = array('onoff'); $meta['useheading'] = array('onoff');
$meta['refcheck'] = array('onoff'); $meta['refcheck'] = array('onoff');
$meta['refshow'] = array('numeric'); $meta['refshow'] = array('numeric');
$meta['allowdebug'] = array('onoff');
$meta['usewordblock']= array('onoff'); $meta['usewordblock']= array('onoff');
$meta['indexdelay'] = array('numeric'); $meta['indexdelay'] = array('numeric');
...@@ -123,7 +124,6 @@ $meta['gdlib'] = array('multichoice','_choices' => array(0,1,2)); ...@@ -123,7 +124,6 @@ $meta['gdlib'] = array('multichoice','_choices' => array(0,1,2));
$meta['im_convert'] = array('im_convert'); $meta['im_convert'] = array('im_convert');
$meta['spellchecker']= array('onoff'); $meta['spellchecker']= array('onoff');
$meta['subscribers'] = array('onoff'); $meta['subscribers'] = array('onoff');
$meta['pluginmanager'] = array('onoff');
$meta['compress'] = array('onoff'); $meta['compress'] = array('onoff');
$meta['hidepages'] = array(''); $meta['hidepages'] = array('');
$meta['send404'] = array('onoff'); $meta['send404'] = array('onoff');
......
...@@ -40,28 +40,18 @@ if (!class_exists('setting_savedir')) { ...@@ -40,28 +40,18 @@ if (!class_exists('setting_savedir')) {
} }
if (!class_exists('setting_authtype')) { if (!class_exists('setting_authtype')) {
class setting_authtype extends setting { class setting_authtype extends setting_multichoice {
var $_pattern = '#^[a-zA-Z0-9_]*$#';
function update($input) { function initialize($default,$local,$protected) {
if ($this->is_protected()) return false;
$input = trim($input);
$value = is_null($this->_local) ? $this->_default : $this->_local;
if ($value == $input) return false;
if (preg_match($this->_pattern, $input)) { // populate $this->_choices with a list of available auth mechanisms
if (@file_exists(DOKU_INC.'inc/auth/'.$input.'.class.php') || $authtypes = glob(DOKU_INC.'inc/auth/*.class.php');
@file_exists(DOKU_INC.'inc/auth/'.$input.'.php')) { $authtypes = preg_replace('#^.*/([^/]*)\.class\.php$#i','$1', $authtypes);
$this->_local = $input; sort($authtypes);
return true;
} $this->_choices = $authtypes;
}
parent::initialize($default,$local,$protected);
$this->_error = true;
$this->_input = $input;
return false;
} }
} }
} }
......
...@@ -40,7 +40,7 @@ class admin_plugin_plugin extends DokuWiki_Admin_Plugin { ...@@ -40,7 +40,7 @@ class admin_plugin_plugin extends DokuWiki_Admin_Plugin {
function admin_plugin_plugin() { function admin_plugin_plugin() {
global $conf; global $conf;
$this->disabled = (!isset($conf['pluginmanager']) || ($conf['pluginmanager'] == 0)); $this->disabled = (isset($conf['pluginmanager']) && ($conf['pluginmanager'] == 0));
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment