1<?php
2/**
3 * @license    http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.html
4 * @author     Francois Merciol <dokuplugin@merciol.fr>
5 *
6 * Plugin Schedule: manage events per wiki @groups
7 */
8
9if (!defined ('DOKU_INC'))
10  die ();
11if (!defined ('DOKU_PLUGIN'))
12  define ('DOKU_PLUGIN', DOKU_INC.'lib/plugins/');
13require_once (DOKU_PLUGIN.'action.php');
14
15class action_plugin_schedule extends DokuWiki_Action_Plugin {
16
17    // ============================================================
18    function register (Doku_Event_Handler $controller) {
19        $controller->register_hook ('DOKUWIKI_STARTED', 'AFTER',  $this, '_defconf');
20    }
21    function _defconf (&$event, $param) {
22        global $JSINFO;
23        $JSINFO ['schedule']['useMap'] = $this->getConf ('useMap');
24        $JSINFO ['schedule']['defaultCenter'] = json_decode ($this->getConf ('defaultCenter'), true);
25        $JSINFO ['schedule']['defaultZoom'] = json_decode ($this->getConf ('defaultZoom'), true);
26    }
27
28    // ============================================================
29}
30