fix bug#956 (also sp. in pluginutils)

darcs-hash:20061027004117-9b6ab-b7eda08e246e942a1ca4841b94abeda4c2ed722c.gz
This commit is contained in:
chris
2006-10-27 02:41:17 +02:00
parent 9475d4adbf
commit 173f278305
2 changed files with 6 additions and 3 deletions

View File

@ -82,7 +82,7 @@ function &plugin_load($type,$name){
} }
} }
//construct class and instanciate //construct class and instantiate
$class = $type.'_plugin_'.$name; $class = $type.'_plugin_'.$name;
if (!class_exists($class)) return null; if (!class_exists($class)) return null;

View File

@ -133,8 +133,11 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode {
foreach($allowedModeTypes as $mt) { foreach($allowedModeTypes as $mt) {
$this->allowedModes = array_merge($this->allowedModes, $PARSER_MODES[$mt]); $this->allowedModes = array_merge($this->allowedModes, $PARSER_MODES[$mt]);
} }
unset($this->allowedModes[array_search(substr(get_class($this), 7), $this->allowedModes)]); $idx = array_search(substr(get_class($this), 7), $this->allowedModes);
if ($idx !== false) {
unset($this->allowedModes[$idx]);
}
$this->allowedModesSetup = true; $this->allowedModesSetup = true;
} }