Project

General

Profile

« Previous | Next » 

Revision 1638

Added by darkviper over 12 years ago

config.php added define to set admin-directory

View differences:

branches/2.8.x/CHANGELOG
12 12
===============================================================================
13 13

  
14 14

  
15
14 Mar-2012 Build 1638 Werner v.d.Decken(DarkViper)
16
+ config.php added define to set admin-directory
15 17
13 Mar-2012 Build 1637 Werner v.d.Decken(DarkViper)
16 18
! made handling of config.php a little bit more easy
17 19
09 Mar-2012 Build 1636 Dietmar Woellbrink (Luisehahne)
branches/2.8.x/wb/admin/interface/version.php
51 51

  
52 52
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
53 53
if(!defined('VERSION')) define('VERSION', '2.8.3');
54
if(!defined('REVISION')) define('REVISION', '1637');
54
if(!defined('REVISION')) define('REVISION', '1638');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/framework/initialize.php
50 50
		$_SERVER['HTTP_REFERER'] = $sTmpReferer;
51 51
	}
52 52

  
53
if( !defined('ADMIN_URL')) { define('ADMIN_URL', WB_URL.'/admin'); }
53
if( !defined('ADMIN_DIRECTORY')) { define('ADMIN_DIRECTORY', 'admin'); }
54
if(!preg_match('/xx[a-z0-9_][a-z0-9_\-\.]+/i', 'xx'.ADMIN_DIRECTORY)) {
55
	throw new RuntimeException('Invalid admin-directory: ' . ADMIN_DIRECTORY);
56
}
57

  
58
if( !defined('ADMIN_URL')) { define('ADMIN_URL', WB_URL.'/'.ADMIN_DIRECTORY); }
54 59
if( !defined('WB_PATH')) { define('WB_PATH', dirname(dirname(__FILE__))); }
55
if( !defined('ADMIN_PATH')) { define('ADMIN_PATH', WB_PATH.'/admin'); }
60
if( !defined('ADMIN_PATH')) { define('ADMIN_PATH', WB_PATH.'/'.ADMIN_DIRECTORY); }
56 61

  
57 62
if (file_exists(WB_PATH.'/framework/class.database.php')) {
58 63
	// sanitize $_SERVER['HTTP_REFERER']
branches/2.8.x/wb/install/save.php
292 292
"define('TABLE_PREFIX', '$table_prefix');\n".
293 293
"\n".
294 294
"define('WB_URL', '$wb_url');\n".
295
"define('ADMIN_DIRECTORY', 'admin'); // no leading/trailing slash or backslash!! A simple directory only!!\n".
295 296
"\n".
296 297
"require_once(dirname(__FILE__).'/framework/initialize.php');\n".
297 298
"\n";

Also available in: Unified diff