Fix method signatures for PHP 7.0 compatibility
[mirrors/DokuWiki-Plugin-SVGEdit.git] / action.php
CommitLineData
b3a6ad9d
H
1<?php
2
3if(!defined('DOKU_INC')) die();
4if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
5require_once DOKU_PLUGIN.'action.php';
6
7class action_plugin_svgedit extends DokuWiki_Action_Plugin {
8
9 function getInfo(){
10 return array('author' => 'Thomas Mudrunka',
11 'email' => 'harvie--email-cz',
12 'date' => '2010-02-21',
13 'name' => 'SVG-Edit Plugin (do=export_svg handler)',
14 'desc' => 'Adds handler to have clean way for exporting SVGs',
15 'url' => 'http://www.dokuwiki.org/plugin:svgedit'
16 );
17 }
b7eaee49
MH
18
19 function register(Doku_Event_Handler $controller) {
b3a6ad9d
H
20 $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this,
21 '_hookdo');
22 }
b7eaee49
MH
23
24 function _hookdo(Doku_Event $event, $param) {
b3a6ad9d
H
25 global $ID;
26 if($event->data === 'export_svg' && auth_quickaclcheck($ID) >= AUTH_READ) {
27 header('Content-type: image/svg+xml');
28 die(rawWiki($ID));
29 }
30 }
31}
This page took 0.10704 seconds and 4 git commands to generate.