summaryrefslogtreecommitdiff
path: root/inc/parserutils.php
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2014-03-13 19:58:05 +0000
committerChristopher Smith <chris@jalakai.co.uk>2014-03-13 19:58:05 +0000
commit6e6d16edde50ed56a86641e03a8df3885f95ae2e (patch)
tree65409edcaa0c17501eaf52c1c620bc11dce6ae44 /inc/parserutils.php
parent069942acdaa5ba825bc3f92c7093b5071789f1ca (diff)
downloadrpg-6e6d16edde50ed56a86641e03a8df3885f95ae2e.tar.gz
rpg-6e6d16edde50ed56a86641e03a8df3885f95ae2e.tar.bz2
Fix a couple of issues with PR#571
1. renderer validity checks were too stringent for plugins, format should only need to be checked when mode is 'xhtml' 2. E_USER_WARNING message should now be obsolete, its previous use was to generate a warning when 'xhtml' rendering failed. PR#571 insures 'xhtml' rendering always succeeds.
Diffstat (limited to 'inc/parserutils.php')
-rw-r--r--inc/parserutils.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/inc/parserutils.php b/inc/parserutils.php
index 06bd6dbb8..8244837e1 100644
--- a/inc/parserutils.php
+++ b/inc/parserutils.php
@@ -636,9 +636,9 @@ function p_get_renderer($mode) {
return $Renderer;
}
- // not bundled, see if its an enabled plugin for rendering $mode
+ // not bundled, see if its an enabled renderer plugin & when $mode is 'xhtml', the renderer can supply that format.
$Renderer = $plugin_controller->load('renderer',$rname);
- if ($Renderer && is_a($Renderer, 'Doku_Renderer') && ($mode == $Renderer->getFormat())) {
+ if ($Renderer && is_a($Renderer, 'Doku_Renderer') && ($mode != 'xhtml' || $mode == $Renderer->getFormat())) {
return $Renderer;
}
@@ -660,7 +660,6 @@ function p_get_renderer($mode) {
}
// fallback failed, alert the world
- trigger_error("Unable to resolve render class $rclass",E_USER_WARNING);
msg("No renderer '$rname' found for mode '$mode'",-1);
return null;
}