Index: branches/unlabeled/unlabeled-1.39.2/kernel/startup.php =================================================================== diff -u -N -r4251 -r4376 --- branches/unlabeled/unlabeled-1.39.2/kernel/startup.php (.../startup.php) (revision 4251) +++ branches/unlabeled/unlabeled-1.39.2/kernel/startup.php (.../startup.php) (revision 4376) @@ -5,17 +5,8 @@ if( !isset($FrontEnd) ) $FrontEnd = 0; - # New path detection method: begin -// safeDefine('REL_PATH', '/admin'); - $k4_path_detection = false; - if( defined('REL_PATH') ) + if( !class_exists('kApplication') ) { - $ps = preg_replace("/".preg_quote(rtrim(REL_PATH, '/'), '/')."$/", '', str_replace('\\', '/', dirname($_SERVER['PHP_SELF']))); - if (!defined('BASE_PATH')) { - define('BASE_PATH', $ps); // in case in-portal has defined it before - } - # New path detection method: end - // KENEL4 INIT: BEGIN if ($FrontEnd != 1 && !defined('ADMIN') ) { define('ADMIN', 1); @@ -34,27 +25,22 @@ $application =& kApplication::Instance(); $application->Init(); $application->ProcessRequest(); - - // compatibility constants - $g_TablePrefix = TABLE_PREFIX; - $pathtoroot = FULL_PATH.'/'; - - $admin = 'admin'; - $rootURL = PROTOCOL.SERVER_NAME.(defined('PORT')?':'.PORT : '').rtrim(BASE_PATH, '/').'/'; - $localURL = $rootURL.'kernel/'; - $adminURL = $rootURL.$admin; - $imagesURL = $adminURL.'/images'; - $browseURL = $adminURL.'/browse'; - $cssURL = $adminURL.'/include'; - $pathchar = '/'; // KERNEL4 INIT: END - $k4_path_detection = true; - define('OLD_STARTUP', 0); } - else { - define('OLD_STARTUP', 1); - } + // compatibility constants + $g_TablePrefix = TABLE_PREFIX; + $pathtoroot = FULL_PATH.'/'; + + $admin = 'admin'; + $rootURL = PROTOCOL.SERVER_NAME.(defined('PORT')?':'.PORT : '').rtrim(BASE_PATH, '/').'/'; + $localURL = $rootURL.'kernel/'; + $adminURL = $rootURL.$admin; + $imagesURL = $adminURL.'/images'; + $browseURL = $adminURL.'/browse'; + $cssURL = $adminURL.'/include'; + $pathchar = '/'; + if(!get_magic_quotes_gpc()) { function addSlashesA($a)