plugin related autoloading
This patch moved the place where DOKU_PLUGIN is defined. It no longer can be set from a normal config (only via preload)
This commit is contained in:
parent
0af14a6e25
commit
c2a6d81662
|
@ -20,6 +20,9 @@ if (@file_exists($preload)) include($preload);
|
|||
// define the include path
|
||||
if(!defined('DOKU_INC')) define('DOKU_INC',fullpath(dirname(__FILE__).'/../').'/');
|
||||
|
||||
// define Plugin dir
|
||||
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
|
||||
|
||||
// define config path (packagers may want to change this to /etc/dokuwiki/)
|
||||
if(!defined('DOKU_CONF')) define('DOKU_CONF',DOKU_INC.'conf/');
|
||||
|
||||
|
@ -158,8 +161,6 @@ if(!defined('DOKU_TAB')) define ('DOKU_TAB',"\t");
|
|||
// define cookie and session id, append server port when securecookie is configured FS#1664
|
||||
if (!defined('DOKU_COOKIE')) define('DOKU_COOKIE', 'DW'.md5(DOKU_REL.(($conf['securecookie'])?$_SERVER['SERVER_PORT']:'')));
|
||||
|
||||
// define Plugin dir
|
||||
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
|
||||
|
||||
// define main script
|
||||
if(!defined('DOKU_SCRIPT')) define('DOKU_SCRIPT','doku.php');
|
||||
|
|
|
@ -76,6 +76,11 @@ function load_autoload($name){
|
|||
'GeSHi' => DOKU_INC.'inc/geshi.php',
|
||||
'TarLib' => DOKU_INC.'inc/TarLib.class.php',
|
||||
'ZibLib' => DOKU_INC.'inc/ZipLib.class.php',
|
||||
|
||||
'DokuWiki_Action_Plugin' => DOKU_PLUGIN.'action.php',
|
||||
'DokuWiki_Admin_Plugin' => DOKU_PLUGIN.'admin.php',
|
||||
'DokuWiki_Syntax_Plugin' => DOKU_PLUGIN.'syntax.php',
|
||||
|
||||
);
|
||||
|
||||
if(isset($classes[$name])){
|
||||
|
|
|
@ -10,9 +10,6 @@
|
|||
// must be run within Dokuwiki
|
||||
if(!defined('DOKU_INC')) die();
|
||||
|
||||
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
|
||||
require_once(DOKU_PLUGIN.'admin.php');
|
||||
|
||||
/**
|
||||
* All DokuWiki plugins to extend the admin function
|
||||
* need to inherit from this class
|
||||
|
@ -216,7 +213,6 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
|
|||
* @author Andreas Gohr <andi@splitbrain.org>
|
||||
*/
|
||||
function _html_explorer(){
|
||||
require_once(DOKU_INC.'inc/search.php');
|
||||
global $conf;
|
||||
global $ID;
|
||||
global $lang;
|
||||
|
|
|
@ -13,9 +13,6 @@ if(!count($_POST) && $HTTP_RAW_POST_DATA){
|
|||
|
||||
if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../../');
|
||||
require_once(DOKU_INC.'inc/init.php');
|
||||
require_once(DOKU_INC.'inc/common.php');
|
||||
require_once(DOKU_INC.'inc/pageutils.php');
|
||||
require_once(DOKU_INC.'inc/auth.php');
|
||||
//close session
|
||||
session_write_close();
|
||||
|
||||
|
@ -24,8 +21,6 @@ if(!checkSecurityToken()) die('CRSF Attack');
|
|||
|
||||
$ID = getID();
|
||||
|
||||
require_once(DOKU_INC.'inc/pluginutils.php');
|
||||
require_once(DOKU_INC.'inc/html.php');
|
||||
$acl = plugin_load('admin','acl');
|
||||
$acl->handle();
|
||||
|
||||
|
@ -35,7 +30,6 @@ header('Content-Type: text/html; charset=utf-8');
|
|||
if($ajax == 'info'){
|
||||
$acl->_html_info();
|
||||
}elseif($ajax == 'tree'){
|
||||
require_once(DOKU_INC.'inc/search.php');
|
||||
global $conf;
|
||||
global $ID;
|
||||
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
// must be run within Dokuwiki
|
||||
if(!defined('DOKU_INC')) die();
|
||||
|
||||
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
|
||||
require_once(DOKU_INC.'inc/plugin.php');
|
||||
|
||||
/**
|
||||
* All DokuWiki plugins to interfere with the event system
|
||||
* need to inherit from this class
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
// must be run within Dokuwiki
|
||||
if(!defined('DOKU_INC')) die();
|
||||
|
||||
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
|
||||
require_once(DOKU_INC.'inc/plugin.php');
|
||||
|
||||
/**
|
||||
* All DokuWiki plugins to extend the admin function
|
||||
* need to inherit from this class
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
// must be run within Dokuwiki
|
||||
if(!defined('DOKU_INC')) die();
|
||||
|
||||
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
|
||||
require_once(DOKU_PLUGIN.'admin.php');
|
||||
|
||||
define('CM_KEYMARKER','____'); // used for settings with multiple dimensions of array indices
|
||||
|
||||
define('PLUGIN_SELF',dirname(__FILE__).'/');
|
||||
|
|
|
@ -528,8 +528,6 @@ if (!class_exists('setting_password')) {
|
|||
}
|
||||
|
||||
if (!class_exists('setting_email')) {
|
||||
|
||||
require_once(DOKU_INC.'inc/mail.php');
|
||||
if (!defined('SETTING_EMAIL_PATTERN')) define('SETTING_EMAIL_PATTERN','<^'.PREG_PATTERN_VALID_EMAIL.'$>');
|
||||
|
||||
class setting_email extends setting_string {
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
// must be run within Dokuwiki
|
||||
if(!defined('DOKU_INC')) die();
|
||||
|
||||
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
|
||||
require_once(DOKU_PLUGIN.'syntax.php');
|
||||
|
||||
/**
|
||||
* All DokuWiki plugins to extend the parser/rendering mechanism
|
||||
* need to inherit from this class
|
||||
|
|
|
@ -13,8 +13,6 @@ if(!defined('DOKU_INC')) die();
|
|||
// - allow a plugin to contain extras to be copied to the current template (extra/tpl/)
|
||||
// - to images (lib/images/) [ not needed, should go in lib/plugin/images/ ]
|
||||
|
||||
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
|
||||
require_once(DOKU_PLUGIN.'admin.php');
|
||||
require_once(DOKU_PLUGIN."/plugin/classes/ap_manage.class.php");
|
||||
|
||||
//--------------------------[ GLOBALS ]------------------------------------------------
|
||||
|
|
|
@ -197,8 +197,6 @@ class ap_download extends ap_manage {
|
|||
|
||||
$ext = $this->guess_archive($file);
|
||||
if (in_array($ext, array('tar','bz','gz'))) {
|
||||
require_once(DOKU_INC."inc/TarLib.class.php");
|
||||
|
||||
switch($ext){
|
||||
case 'bz':
|
||||
$compress_type = COMPRESS_BZIP;
|
||||
|
@ -227,7 +225,6 @@ class ap_download extends ap_manage {
|
|||
}
|
||||
return true;
|
||||
} else if ($ext == 'zip') {
|
||||
require_once(DOKU_INC."inc/ZipLib.class.php");
|
||||
|
||||
$zip = new ZipLib();
|
||||
$ok = $zip->Extract($file, $target);
|
||||
|
|
|
@ -8,12 +8,6 @@
|
|||
// must be run within Dokuwiki
|
||||
if(!defined('DOKU_INC')) die();
|
||||
|
||||
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
|
||||
require_once(DOKU_PLUGIN.'admin.php');
|
||||
require_once(DOKU_INC.'inc/infoutils.php');
|
||||
require_once(DOKU_INC.'inc/pluginutils.php');
|
||||
require_once(DOKU_INC.'inc/search.php');
|
||||
|
||||
/**
|
||||
* All DokuWiki plugins to extend the admin function
|
||||
* need to inherit from this class
|
||||
|
|
|
@ -2,10 +2,6 @@
|
|||
// must be run within Dokuwiki
|
||||
if(!defined('DOKU_INC')) die();
|
||||
|
||||
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
|
||||
require_once(DOKU_PLUGIN.'admin.php');
|
||||
require_once(DOKU_INC.'inc/changelog.php');
|
||||
|
||||
/**
|
||||
* All DokuWiki plugins to extend the admin function
|
||||
* need to inherit from this class
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
// must be run within Dokuwiki
|
||||
if(!defined('DOKU_INC')) die();
|
||||
|
||||
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
|
||||
require_once(DOKU_INC.'inc/parser/parser.php');
|
||||
|
||||
/**
|
||||
* All DokuWiki plugins to extend the parser/rendering mechanism
|
||||
* need to inherit from this class
|
||||
|
|
|
@ -13,9 +13,7 @@
|
|||
// must be run within Dokuwiki
|
||||
if(!defined('DOKU_INC')) die();
|
||||
|
||||
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
|
||||
if(!defined('DOKU_PLUGIN_IMAGES')) define('DOKU_PLUGIN_IMAGES',DOKU_BASE.'lib/plugins/usermanager/images/');
|
||||
require_once(DOKU_PLUGIN.'admin.php');
|
||||
|
||||
/**
|
||||
* All DokuWiki plugins to extend the admin function
|
||||
|
|
Loading…
Reference in New Issue