diff options
author | Klap-in <klapinklapin@gmail.com> | 2013-07-14 13:35:06 +0200 |
---|---|---|
committer | Klap-in <klapinklapin@gmail.com> | 2013-07-14 13:35:06 +0200 |
commit | 33c3b3817b00aa9384760813643fac0e33daaaff (patch) | |
tree | 481c880b00a32ba5887834b52a17248bac8bfc7c /inc/plugin.php | |
parent | 040f0e135c37c5b544f16277ff69205369df5f1f (diff) | |
parent | fbd8067eeeb9f424981aad8b283e17f734c738c3 (diff) | |
download | rpg-33c3b3817b00aa9384760813643fac0e33daaaff.tar.gz rpg-33c3b3817b00aa9384760813643fac0e33daaaff.tar.bz2 |
merge master in branch
Diffstat (limited to 'inc/plugin.php')
-rw-r--r-- | inc/plugin.php | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/inc/plugin.php b/inc/plugin.php index 153e89407..4d3d45f62 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 @@ -133,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; + } } /** @@ -189,7 +198,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{ @@ -249,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); } } |