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 --- inc/plugin.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/plugin.php') 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 -- cgit v1.2.3 From 2657e46860a359adae6f3bf3bbf8d7fcaf626f31 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Nov 2012 16:31:57 +0100 Subject: authmysql fixes * use proper plugin config * code/PHP5 cleanup --- inc/plugin.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'inc/plugin.php') diff --git a/inc/plugin.php b/inc/plugin.php index 0e17dc417..2b4111fe1 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -134,12 +134,20 @@ class DokuWiki_Plugin { * getConf($setting) * * use this function to access plugin configuration variables + * + * @param string $setting the setting to access + * @param mixed $notset what to return if the setting is not available + * @return mixed */ - function getConf($setting){ + function getConf($setting, $notset=false){ if (!$this->configloaded){ $this->loadConfig(); } - return $this->conf[$setting]; + if(isset($this->conf[$setting])){ + return $this->conf[$setting]; + }else{ + return $notset; + } } /** -- cgit v1.2.3 From e1cc03e353022c84d330ba3d9d5cba92cd4878a6 Mon Sep 17 00:00:00 2001 From: Klap-in Date: Sun, 27 Jan 2013 22:45:47 +0100 Subject: $msg of loadHelper for base plugin class default to true too. --- inc/plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/plugin.php') diff --git a/inc/plugin.php b/inc/plugin.php index 153e89407..649fc1f26 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -189,7 +189,7 @@ class DokuWiki_Plugin { * * @return object helper plugin object */ - function loadHelper($name, $msg){ + function loadHelper($name, $msg = true){ if (!plugin_isdisabled($name)){ $obj = plugin_load('helper',$name); }else{ -- cgit v1.2.3 From c33b315b06b3a52a61cb1ecc2b3beadd4ecd0311 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 18 Feb 2013 01:08:40 +0000 Subject: removed a bunch of functions which were deprecated in 2005/2006 --- inc/plugin.php | 7 ------- 1 file changed, 7 deletions(-) (limited to 'inc/plugin.php') diff --git a/inc/plugin.php b/inc/plugin.php index cd6bd5ac7..4d3d45f62 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -258,11 +258,4 @@ class DokuWiki_Plugin { function isSingleton() { return true; } - - // deprecated functions - function plugin_localFN($id) { return $this->localFN($id); } - function plugin_locale_xhtml($id) { return $this->locale_xhtml($id); } - function plugin_email($e, $n='', $c='', $m='') { return $this->email($e, $n, $c, $m); } - function plugin_link($l, $t='', $c='', $to='', $m='') { return $this->external_link($l, $t, $c, $to, $m); } - function plugin_render($t, $f='xhtml') { return $this->render($t, $f); } } -- cgit v1.2.3