diff options
author | Andreas Gohr <andi@splitbrain.org> | 2005-08-03 20:02:26 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2005-08-03 20:02:26 +0200 |
commit | 4f32716ed3cd44b3827d2a778211d2516344f77b (patch) | |
tree | c07485db221b1bafb7595c28a7a49ae8cce8cf32 /inc/pluginutils.php | |
parent | 6446f4865bfc0cf3b09a58530ce37fd614b8fcdf (diff) | |
download | rpg-4f32716ed3cd44b3827d2a778211d2516344f77b.tar.gz rpg-4f32716ed3cd44b3827d2a778211d2516344f77b.tar.bz2 |
plugin tweaks, info plugin fixes
darcs-hash:20050803180226-7ad00-7bce1982ed6589511ce38e2e4e5e4cdf8640a0ae.gz
Diffstat (limited to 'inc/pluginutils.php')
-rw-r--r-- | inc/pluginutils.php | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/inc/pluginutils.php b/inc/pluginutils.php index 7ed229947..89d0c9f44 100644 --- a/inc/pluginutils.php +++ b/inc/pluginutils.php @@ -68,28 +68,31 @@ function plugin_list($type=''){ * * @param $type string type of plugin to load * @param $name string name of the plugin to load - * @return object the plugin object or null on failure + * @return objectreference the plugin object or null on failure */ function &plugin_load($type,$name){ //we keep all loaded plugins available in global scope for reuse global $DOKU_PLUGINS; - //plugin already loaded? - if($DOKU_PLUGINS[$type][$name] != null){ - return $DOKU_PLUGINS[$type][$name]; - } + + //plugin already loaded? + if($DOKU_PLUGINS[$type][$name] != null){ + return $DOKU_PLUGINS[$type][$name]; + } //try to load the wanted plugin file - if(!@include_once(DOKU_PLUGIN."$name/$type.php")){ + if(!include_once(DOKU_PLUGIN."$name/$type.php")){ list($plugin, $component) = preg_split("/_/",$name, 2); - if (!$component || !@include_once(DOKU_PLUGIN."$plugin/$type/$component.php")) { + if (!$component || !include_once(DOKU_PLUGIN."$plugin/$type/$component.php")) { return null; } } +/* FIXME: chris: what's this for? global $plugin_investigate_pluginorder; if (!isset($plugin_investigate_pluginorder)) $plugin_investigate_pluginorder = array(); $plugin_investigate_pluginorder[] = $name; +*/ //construct class and instanciate $class = $type.'_plugin_'.$name; |