<?php

/**
 * DokuWiki DAVCard PlugIn - JSINFO component
 * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
 * @author  Andreas Böhler <dev@aboehler.at>
 */
 
if(!defined('DOKU_INC')) die();

class action_plugin_davcard_jsinfo extends DokuWiki_Action_Plugin {

    function register(Doku_Event_Handler $controller) {
        $controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'add_jsinfo_information');
    }

    /**
     * Add the language variable to the JSINFO variable
     */
    function add_jsinfo_information(Doku_Event $event, $param) {
      global $JSINFO;
 
      $JSINFO['plugin']['davcard']['sectok'] = getSecurityToken();
    }  
}
