summaryrefslogtreecommitdiff
path: root/lib/plugins/config/settings
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plugins/config/settings')
-rw-r--r--lib/plugins/config/settings/config.metadata.php9
-rw-r--r--lib/plugins/config/settings/extra.class.php20
2 files changed, 14 insertions, 15 deletions
diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php
index d39ee7b50..7aa570f63 100644
--- a/lib/plugins/config/settings/config.metadata.php
+++ b/lib/plugins/config/settings/config.metadata.php
@@ -2,7 +2,7 @@
/**
* Metadata for configuration manager plugin
*
- * Note: This file should be included within a function to ensure it
+ * Note: This file should be included within a function to ensure it
* doesn't class with the settings it is describing.
*
* Format:
@@ -58,12 +58,12 @@ $file['default'] = "DOKU_CONF.'dokuwiki.php'"; // optional
$file['protected'] = "DOKU_CONF.'local.protected.php'"; // optional
// test value (FIXME, remove before publishing)
-//$meta['test'] = array('multichoice','_choices' => array(''));
-
+//$meta['test'] = array('multichoice','_choices' => array(''));
+
// --------------[ setting metadata ]------------------------------------
// - for description of format and fields see top of file
// - order the settings in the order you wish them to appear
-// - any settings not mentioned will come after the last setting listed and
+// - any settings not mentioned will come after the last setting listed and
// will use the default class with no parameters
$meta['title'] = array('');
@@ -72,7 +72,6 @@ $meta['savedir'] = array('savedir');
$meta['lang'] = array('dirchoice','_dir' => DOKU_INC.'inc/lang/');
$meta['template'] = array('dirchoice','_dir' => DOKU_INC.'lib/tpl/');
-$meta['umask'] = array('numeric','_pattern' => '/0[0-7]{3}/'); // only accept octal representation
$meta['dmode'] = array('numeric','_pattern' => '/0[0-7]{3}/'); // only accept octal representation
$meta['fmode'] = array('numeric','_pattern' => '/0[0-7]{3}/'); // only accept octal representation
$meta['basedir'] = array('');
diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php
index 145e3c850..805806e8b 100644
--- a/lib/plugins/config/settings/extra.class.php
+++ b/lib/plugins/config/settings/extra.class.php
@@ -7,11 +7,11 @@
if (!class_exists('setting_sepchar')) {
class setting_sepchar extends setting_multichoice {
-
+
function setting_sepchar($key,$param=NULL) {
$str = '_-.';
- for ($i=0;$i<strlen($str);$i++) $this->_choices[] = $str{$i};
-
+ for ($i=0;$i<strlen($str);$i++) $this->_choices[] = $str{$i};
+
// call foundation class constructor
$this->setting($key,$param);
}
@@ -23,7 +23,7 @@ if (!class_exists('setting_savedir')) {
function update($input) {
if ($this->is_protected()) return false;
-
+
$value = is_null($this->_local) ? $this->_default : $this->_local;
if ($value == $input) return false;
@@ -32,7 +32,7 @@ if (!class_exists('setting_savedir')) {
$this->_input = $input;
return false;
}
-
+
$this->_local = $input;
return true;
}
@@ -50,7 +50,7 @@ if (!class_exists('setting_authtype')) {
sort($authtypes);
$this->_choices = $authtypes;
-
+
parent::initialize($default,$local,$protected);
}
}
@@ -61,18 +61,18 @@ if (!class_exists('setting_im_convert')) {
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;
if ($input && !@file_exists($input)) {
$this->_error = true;
$this->_input = $input;
- return false;
+ return false;
}
-
+
$this->_local = $input;
return true;
}