From 46b991a30bc4c7dab4e06bdd3f9a70a34204e005 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Nov 2012 14:32:33 +0100 Subject: merge old auth style configs with plugin config --- lib/plugins/auth.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/plugins') 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; + } } -- cgit v1.2.3