diff --git a/inc/pluginutils.php b/inc/pluginutils.php index 7ed229947fb18950a0d89a8071f7a46d9572a765..89d0c9f4476aa1368fde07795a5ff15035fd530e 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; diff --git a/lib/plugins/info/syntax.php b/lib/plugins/info/syntax.php index 34acd98b711861f6651a933d8581b266a899daeb..ed555b65d5689262d744633281c2cb06cca2ea93 100644 --- a/lib/plugins/info/syntax.php +++ b/lib/plugins/info/syntax.php @@ -6,6 +6,7 @@ * @author Andreas Gohr <andi@splitbrain.org> */ + if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); require_once(DOKU_PLUGIN.'syntax.php'); @@ -23,7 +24,7 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { return array( 'author' => 'Andreas Gohr', 'email' => 'andi@splitbrain.org', - 'date' => '2005-06-26', + 'date' => '2005-08-03', 'name' => 'Info Plugin', 'desc' => 'Displays information about various DokuWiki internals', 'url' => 'http://wiki.splitbrain.org/plugin:info', @@ -106,21 +107,21 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { $plugins = plugin_list('syntax'); foreach($plugins as $p){ - if(plugin_load('syntax',$p,$po)){ - $info = $po->getInfo(); - - $renderer->doc .= '<li>'; - $renderer->externallink($info['url'],$info['name']); - $renderer->doc .= ' '; - $renderer->doc .= '<i>'.$info['date'].'</i>'; - $renderer->doc .= ' '; - $renderer->doc .= $lang['by']; - $renderer->doc .= ' '; - $renderer->emaillink($info['email'],$info['author']); - $renderer->doc .= '<br />'; - $renderer->doc .= htmlspecialchars($info['desc']); - $renderer->doc .= '</li>'; - } + $po =& plugin_load('syntax',$p); + $info = $po->getInfo(); + + $renderer->doc .= '<li>'; + $renderer->externallink($info['url'],$info['name']); + $renderer->doc .= ' '; + $renderer->doc .= '<i>'.$info['date'].'</i>'; + $renderer->doc .= ' '; + $renderer->doc .= $lang['by']; + $renderer->doc .= ' '; + $renderer->emaillink($info['email'],$info['author']); + $renderer->doc .= '<br />'; + $renderer->doc .= htmlspecialchars($info['desc']); + $renderer->doc .= '</li>'; + unset($po); } $renderer->doc .= '</ul>'; diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php index d42169a45bcc8cb056f96a96385e5379b104cc7e..f5a2ee90e0736b4da52ca51de413dae09eeba6e4 100644 --- a/lib/plugins/syntax.php +++ b/lib/plugins/syntax.php @@ -61,9 +61,6 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode { * for correct XHTML nesting. Should return one of the following: * * 'normal' - The plugin can be used inside paragraphs - - - * 'block' - Open paragraphs need to be closed before plugin output * 'stack' - Special case. Plugin wraps other paragraphs. * @@ -140,4 +137,4 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode { } } -//Setup VIM: ex: et ts=4 enc=utf-8 : \ No newline at end of file +//Setup VIM: ex: et ts=4 enc=utf-8 :