summaryrefslogtreecommitdiff
path: root/inc/parserutils.php
diff options
context:
space:
mode:
authorAdrian Lang <mail@adrianlang.de>2011-11-10 15:43:15 +0100
committerAdrian Lang <mail@adrianlang.de>2011-11-10 15:43:15 +0100
commit16a774a8a61756df2d8fb813bfbaed98b42e3e65 (patch)
tree3a48d311e74ccbf4017330cef8af00003b0ddb34 /inc/parserutils.php
parent662a7b3fcc22d8327026bc1ef161a096683f1580 (diff)
parenta5a71ecfcc1ed6bfca1995b39cd0abe4b8dd9eeb (diff)
downloadrpg-16a774a8a61756df2d8fb813bfbaed98b42e3e65.tar.gz
rpg-16a774a8a61756df2d8fb813bfbaed98b42e3e65.tar.bz2
Merge branch 'master' into stable
Conflicts: doku.php
Diffstat (limited to 'inc/parserutils.php')
-rw-r--r--inc/parserutils.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/inc/parserutils.php b/inc/parserutils.php
index abba89b5a..9384929bf 100644
--- a/inc/parserutils.php
+++ b/inc/parserutils.php
@@ -411,6 +411,7 @@ function p_set_metadata($id, $data, $render=false, $persistent=true){
// set both keys individually as the renderer has references to the individual keys
$METADATA_RENDERERS[$id]['current'] = $meta['current'];
$METADATA_RENDERERS[$id]['persistent'] = $meta['persistent'];
+ return true;
} else {
return p_save_metadata($id, $meta);
}
@@ -676,12 +677,16 @@ function & p_get_renderer($mode) {
global $conf, $plugin_controller;
$rname = !empty($conf['renderer_'.$mode]) ? $conf['renderer_'.$mode] : $mode;
+ $rclass = "Doku_Renderer_$rname";
+
+ if( class_exists($rclass) ) {
+ return new $rclass();
+ }
// try default renderer first:
$file = DOKU_INC."inc/parser/$rname.php";
if(@file_exists($file)){
require_once $file;
- $rclass = "Doku_Renderer_$rname";
if ( !class_exists($rclass) ) {
trigger_error("Unable to resolve render class $rclass",E_USER_WARNING);