Index: branches/5.1.x/core/kernel/startup.php =================================================================== diff -u -N -r12127 -r12657 --- branches/5.1.x/core/kernel/startup.php (.../startup.php) (revision 12127) +++ branches/5.1.x/core/kernel/startup.php (.../startup.php) (revision 12657) @@ -1,6 +1,6 @@ Don\'t forget to clean Cache table afterwards'); - } if (!function_exists('getmicrotime')) { function getmicrotime() { - list($usec, $sec) = explode(" ", microtime()); - return ((float)$usec + (float)$sec); + list($usec, $sec) = explode(" ", microtime()); + return ((float)$usec + (float)$sec); } } + $globals_start = getmicrotime(); include_once(KERNEL_PATH . '/globals.php'); // non OOP functions used through kernel, e.g. print_pre include_once(KERNEL_PATH . '/utility/multibyte.php'); // emulating multi-byte php extension $globals_end = getmicrotime(); - define('INPORTAL_ENV', 1); - $vars = parse_portal_ini(FULL_PATH . '/config.php'); $admin_directory = isset($vars['AdminDirectory']) ? $vars['AdminDirectory'] : '/admin'; - safeDefine('ADMIN_DIRECTORY', $admin_directory); + define('ADMIN_DIRECTORY', $admin_directory); # New path detection method: begin if (defined('REL_PATH')) { @@ -51,8 +49,6 @@ safeDefine('BASE_PATH', $ps); // in case in-portal has defined it before # New path detection method: end - safeDefine('INPORTAL_TAGS', true); - safeDefine('NPARSER', 1); // New Parser is enabled safeDefine('SERVER_NAME', $_SERVER['HTTP_HOST'] ? $_SERVER['HTTP_HOST'] : $vars['Domain']); $https_mark = getArrayValue($_SERVER, 'HTTPS'); @@ -93,32 +89,32 @@ define('MODULES_PATH', FULL_PATH); - define('EXPORT_BASE_PATH', (defined('WRITEBALE_BASE') ? WRITEBALE_BASE : ADMIN_DIRECTORY) . '/export'); + define('EXPORT_BASE_PATH', WRITEBALE_BASE . '/export'); define('EXPORT_PATH', FULL_PATH . EXPORT_BASE_PATH); define('GW_CLASS_PATH', MODULES_PATH . '/in-commerce/units/gateways/gw_classes'); // Payment Gateway Classes Path define('SYNC_CLASS_PATH', FULL_PATH . '/sync'); // path for 3rd party user syncronization scripts safeDefine('ENV_VAR_NAME','env'); - safeDefine('IMAGES_PATH', (defined('WRITEBALE_BASE') ? WRITEBALE_BASE : '/kernel') . '/images/'); - safeDefine('IMAGES_PENDING_PATH', IMAGES_PATH . 'pending/'); - safeDefine('CUSTOM_UPLOAD_PATH', '/templates/images/custom/'); + define('IMAGES_PATH', WRITEBALE_BASE . '/images/'); + define('IMAGES_PENDING_PATH', IMAGES_PATH . 'pending/'); safeDefine('MAX_UPLOAD_SIZE', min(ini_get('upload_max_filesize'), ini_get('post_max_size'))*1024*1024); safeDefine('EDITOR_PATH', isset($vars['EditorPath']) ? $vars['EditorPath'] : '/core/editor/'); - if( ini_get('safe_mode') ) define('SAFE_MODE', 1); + if (ini_get('safe_mode')) { + // safe mode will be removed at all in PHP6 + define('SAFE_MODE', 1); + } - safeDefine('EXPERIMENTAL_PRE_PARSE', 1); - - if( file_exists(FULL_PATH . '/debug.php') ) - { + if (file_exists(FULL_PATH . '/debug.php')) { include_once(FULL_PATH . '/debug.php'); - if(isset($dbg_options['DEBUG_MODE']) && $dbg_options['DEBUG_MODE']) { + if (array_key_exists('DEBUG_MODE', $dbg_options) && $dbg_options['DEBUG_MODE']) { $debugger_start = getmicrotime(); include_once(KERNEL_PATH . '/utility/debugger.php'); $debugger_end = getmicrotime(); + if (isset($debugger) && constOn('DBG_PROFILE_INCLUDES')) { $debugger->profileStart('inc_globals', KERNEL_PATH . '/globals.php', $globals_start); $debugger->profileFinish('inc_globals', KERNEL_PATH . '/globals.php', $globals_end); @@ -130,7 +126,7 @@ } } } - + safeDefine('SILENT_LOG', 0); $includes = Array( @@ -155,14 +151,10 @@ $debugger->AttachToApplication(); } - if( !function_exists('adodb_mktime') ) include_once(KERNEL_PATH . '/utility/adodb-time.inc.php'); + if( !function_exists('adodb_mktime') ) { + include_once(KERNEL_PATH . '/utility/adodb-time.inc.php'); + } -// include_once(KERNEL_PATH . '/utility/temp_handler.php'); // needed because of static calls from kBase - // up to here - // global constants define ('KG_TO_POUND', 2.20462262); - define ('POUND_TO_KG', 0.45359237); - - -?> \ No newline at end of file + define ('POUND_TO_KG', 0.45359237); \ No newline at end of file