1<?php 2/** 3 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 4 * @author Adrian Lang <dokuwiki@cosmocode.de> 5 */ 6// must be run within Dokuwiki 7if (!defined('DOKU_INC')) die(); 8 9if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 10require_once(DOKU_PLUGIN.'action.php'); 11 12class action_plugin_ajaxloader extends DokuWiki_Action_Plugin { 13 function register(&$controller) { 14 $controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 15 'ajax'); 16 } 17 18 function ajax(&$event, $param) { 19 $call = $event->data; 20 include 'common.php'; 21 } 22} 23