From 4f32716ed3cd44b3827d2a778211d2516344f77b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 3 Aug 2005 20:02:26 +0200 Subject: plugin tweaks, info plugin fixes darcs-hash:20050803180226-7ad00-7bce1982ed6589511ce38e2e4e5e4cdf8640a0ae.gz --- inc/pluginutils.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'inc/pluginutils.php') 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; -- cgit v1.2.3