-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.php
32 lines (27 loc) · 967 Bytes
/
common.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
* DokuWiki Plugin ac (common stuff)
*
* @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
* @author Adrian Lang <lang@cosmocode.de>
*/
if(!defined('DOKU_INC')) die();
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
require_once DOKU_PLUGIN.'action.php';
require_once DOKU_PLUGIN . 'ac/actions/action.php';
require_once DOKU_PLUGIN . 'ac/ac.php';
require_once DOKU_PLUGIN . 'ac/ajax_loader.php';
function syntax_plugin_ac_autoload($name) {
if (strpos($name, 'syntax_plugin_ac_action_') !== 0) {
return false;
}
$subclass = substr($name, 24);
if (!@file_exists(DOKU_PLUGIN . 'ac/actions/' . $subclass . '.php')) {
eval("class syntax_plugin_ac_action_$subclass extends " .
'syntax_plugin_ac_action { };');
return true;
}
require_once DOKU_PLUGIN . 'ac/actions/' . $subclass . '.php';
return true;
}
spl_autoload_register('syntax_plugin_ac_autoload');