diff options
author | lisps <stummp@loewen.de> | 2014-02-17 23:15:36 +0100 |
---|---|---|
committer | lisps <stummp@loewen.de> | 2014-02-17 23:15:36 +0100 |
commit | d90a79c0ee1837353622e4b2abb0753ca09dffd2 (patch) | |
tree | 554da8dc13606efc2bc1ea7fe3697a5ff87d02e5 /inc/plugin.php | |
parent | f2643d9ff318af1d2fbb6249e929212381959247 (diff) | |
parent | a83975113c7725a13144b3e65bfb58c8447d37d7 (diff) | |
download | rpg-d90a79c0ee1837353622e4b2abb0753ca09dffd2.tar.gz rpg-d90a79c0ee1837353622e4b2abb0753ca09dffd2.tar.bz2 |
Merge remote-tracking branch 'origin/diff_navigation' into revisions
Conflicts:
inc/parser/xhtml.php
Diffstat (limited to 'inc/plugin.php')
-rw-r--r-- | inc/plugin.php | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/inc/plugin.php b/inc/plugin.php index dccd37bd9..95bdaee2b 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -239,10 +239,35 @@ class DokuWiki_Plugin { } /** + * A fallback to provide access to the old render() method + * + * Since syntax plugins provide their own render method with a different signature and they now + * inherit from Doku_Plugin we can no longer have a render() method here (Strict Standards Violation). + * Instead use render_text() + * + * @deprecated 2014-01-22 + * @param $name + * @param $arguments + * @return null|string + */ + function __call($name, $arguments) { + if($name == 'render'){ + if(!isset($arguments[1])) $arguments[1] = 'xhtml'; + return $this->render_text($arguments[0], $arguments[1]); + } + trigger_error("no such method $name", E_ERROR); + return null; + } + + /** * output text string through the parser, allows dokuwiki markup to be used * very ineffecient for small pieces of data - try not to use + * + * @param string $text wiki markup to parse + * @param string $format output format + * @return null|string */ - function render($text, $format='xhtml') { + function render_text($text, $format='xhtml') { return p_render($format, p_get_instructions($text),$info); } |