diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-11-09 14:32:33 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-11-09 14:32:33 +0100 |
commit | 46b991a30bc4c7dab4e06bdd3f9a70a34204e005 (patch) | |
tree | 306b3aa1fbf4df791beb762a78f5aa13aaf6025e | |
parent | 76ce1169a0c8cbb18423b1581800b9aa1050ccd5 (diff) | |
download | rpg-46b991a30bc4c7dab4e06bdd3f9a70a34204e005.tar.gz rpg-46b991a30bc4c7dab4e06bdd3f9a70a34204e005.tar.bz2 |
merge old auth style configs with plugin config
-rw-r--r-- | inc/plugin.php | 1 | ||||
-rw-r--r-- | lib/plugins/auth.php | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/inc/plugin.php b/inc/plugin.php index d2fe3818d..0e17dc417 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -22,6 +22,7 @@ class DokuWiki_Plugin { * * Needs to return a associative array with the following values: * + * base - the plugin's base name (eg. the directory it needs to be installed in) * author - Author of the plugin * email - Email address to contact the author * date - Last modified date of the plugin in YYYY-MM-DD format diff --git a/lib/plugins/auth.php b/lib/plugins/auth.php index cce2370d9..42dbf1859 100644 --- a/lib/plugins/auth.php +++ b/lib/plugins/auth.php @@ -419,4 +419,21 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { global $conf; return ($_SESSION[DOKU_COOKIE]['auth']['time'] >= @filemtime($conf['cachedir'].'/sessionpurge')); } + + /** + * Overrides the standard config loading to integrate old auth module style configs + * + * @deprecated 2012-11-09 + */ + public function loadConfig(){ + global $conf; + $plugin = $this->getPluginName(); + + $default = $this->readDefaultSettings(); + $oldconf = array(); + if(isset($conf['auth'][$plugin])) $oldconf = (array) $conf['auth'][$plugin]; + + $conf['plugin'][$plugin] = array_merge($default, $oldconf, $conf['plugin'][$plugin]); + $this->configloaded = true; + } } |