From 5ecbbf5d00224a27784cf75e88f695cf5a29b69e Mon Sep 17 00:00:00 2001 From: LMS235 Date: Sun, 19 Jun 2016 19:11:43 +0200 Subject: [PATCH] Support redesign dokuwiki-plugin-odt Support redesign dokuwiki-plugin-odt --- syntax.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/syntax.php b/syntax.php index b53f20a..ec5ad0c 100644 --- a/syntax.php +++ b/syntax.php @@ -45,9 +45,17 @@ public function render($mode, Doku_Renderer $renderer, $data) { } # ODT Export Renderer elseif ($mode == 'odt'){ - $sapnote = explode('#', $data[0]); + if (!class_exists('ODTDocument')) { + // support of "old" dokuwiki-plugin-odt + $sapnote = explode('#', $data[0]); $renderer->doc .= "$sapnote[1]"; - return true; + return true; + } else { + // support of redesign dokuwiki-plugin-odt + $sapnote = explode('#', $data[0]); + $renderer->cdata ("$sapnote[1]"); + return true; + } } return false; }