diff options
author | Adrian Lang <lang@cosmocode.de> | 2010-03-29 12:00:30 +0200 |
---|---|---|
committer | Adrian Lang <lang@cosmocode.de> | 2010-03-29 12:37:05 +0200 |
commit | f6ec8df813b28547ca3b04bb39f0ce670a6bb990 (patch) | |
tree | 01cfd7c927495421861eef551b94b8653ca65218 /inc/plugincontroller.class.php | |
parent | ea6dfbca91f6afe89ff631ac28eae023bcc52853 (diff) | |
download | rpg-f6ec8df813b28547ca3b04bb39f0ce670a6bb990.tar.gz rpg-f6ec8df813b28547ca3b04bb39f0ce670a6bb990.tar.bz2 |
Allow plugins to specify that they have to be instantiated
Plugins may return false in isSingleton to let plugin_load return a new
instance every time it is called.
Renderer plugins are not loaded with $new set to true, but instead specify
themself that they are not singletons. This behaviour allows the odt renderer
to keep working (see #1598).
Diffstat (limited to 'inc/plugincontroller.class.php')
-rw-r--r-- | inc/plugincontroller.class.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php index 043687270..61f460414 100644 --- a/inc/plugincontroller.class.php +++ b/inc/plugincontroller.class.php @@ -66,7 +66,7 @@ class Doku_Plugin_Controller { //plugin already loaded? if(!empty($DOKU_PLUGINS[$type][$name])){ - if ($new && !$DOKU_PLUGINS[$type][$name]->isSingleton()) { + if ($new || !$DOKU_PLUGINS[$type][$name]->isSingleton()) { $class = $type.'_plugin_'.$name; return class_exists($class) ? new $class : null; } else { |