From: Michael Hamann Date: Sat, 16 Jan 2016 19:21:46 +0000 (+0100) Subject: Fix method signatures for PHP 7.0 compatibility X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=refs%2Fpull%2F21%2Fhead;p=mirrors%2FDokuWiki-Plugin-SVGEdit.git Fix method signatures for PHP 7.0 compatibility --- diff --git a/action.php b/action.php index f1a722d..549ee30 100644 --- a/action.php +++ b/action.php @@ -15,13 +15,13 @@ class action_plugin_svgedit extends DokuWiki_Action_Plugin { 'url' => 'http://www.dokuwiki.org/plugin:svgedit' ); } - - function register(&$controller) { + + function register(Doku_Event_Handler $controller) { $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, '_hookdo'); } - - function _hookdo(&$event, $param) { + + function _hookdo(Doku_Event $event, $param) { global $ID; if($event->data === 'export_svg' && auth_quickaclcheck($ID) >= AUTH_READ) { header('Content-type: image/svg+xml'); diff --git a/plugin.info.txt b/plugin.info.txt index 93a4aef..d492ac2 100644 --- a/plugin.info.txt +++ b/plugin.info.txt @@ -1,7 +1,7 @@ base svgedit author Thomas Mudrunka email harvie[a]email_cz -date 2014-05-20 +date 2016-01-16 name SVG-Edit plugin desc A nice way, to create, store, edit, and embed SVG images in DokuWiki url http://www.dokuwiki.org/plugin:svgedit diff --git a/syntax.php b/syntax.php index 15dc237..e52c016 100755 --- a/syntax.php +++ b/syntax.php @@ -43,7 +43,7 @@ class syntax_plugin_svgedit extends DokuWiki_Syntax_Plugin { $this->Lexer->addSpecialPattern("", $mode, 'plugin_svgedit'); } - function handle($match, $state, $pos, &$handler) { + function handle($match, $state, $pos, Doku_Handler $handler) { $type = substr($match,0,4); return array($type, $match); } @@ -64,7 +64,7 @@ class syntax_plugin_svgedit extends DokuWiki_Syntax_Plugin { return '<'.$svgtag.'="'.$svglink.'" class="media'.$align.'" alt="'.$title.'" title="'.$title.'" type="image/svg+xml">'.""; } - function render($format, &$renderer, $data) { + function render($format, Doku_Renderer $renderer, $data) { if ($format!='xhtml') return; global $ID;