Index: branches/5.2.x/core/kernel/startup.php
===================================================================
diff -u -N -r14092 -r14095
--- branches/5.2.x/core/kernel/startup.php (.../startup.php) (revision 14092)
+++ branches/5.2.x/core/kernel/startup.php (.../startup.php) (revision 14095)
@@ -1,6 +1,6 @@
';
- echo 'Please use the installation script to fix the problem.
';
+ if (!$vars) {
+ echo 'In-Portal is probably not installed, or configuration file is missing.
';
+ echo 'Please use the installation script to fix the problem.
';
echo 'Go to installation script
';
flush();
exit;
@@ -113,19 +104,21 @@
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');
+ define('ENV_VAR_NAME','env');
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);
+ define('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/');
+ define('EDITOR_PATH', isset($vars['EditorPath']) ? $vars['EditorPath'] : '/core/editor/');
// caching types
define('CACHING_TYPE_NONE', 0);
define('CACHING_TYPE_MEMORY', 1);
define('CACHING_TYPE_TEMPORARY', 2);
+ unset($vars); // just in case someone will be still using it
+
if (ini_get('safe_mode')) {
// safe mode will be removed at all in PHP6
define('SAFE_MODE', 1);
@@ -134,11 +127,11 @@
if (file_exists(WRITEABLE . '/debug.php')) {
include_once(WRITEABLE . '/debug.php');
if (array_key_exists('DEBUG_MODE', $dbg_options) && $dbg_options['DEBUG_MODE']) {
- $debugger_start = getmicrotime();
+ $debugger_start = microtime(true);
include_once(KERNEL_PATH . '/utility/debugger.php');
- $debugger_end = getmicrotime();
+ $debugger_end = microtime(true);
- if (isset($debugger) && constOn('DBG_PROFILE_INCLUDES')) {
+ if (isset($debugger) && kUtil::constOn('DBG_PROFILE_INCLUDES')) {
$debugger->profileStart('inc_globals', KERNEL_PATH . '/globals.php', $globals_start);
$debugger->profileFinish('inc_globals', KERNEL_PATH . '/globals.php', $globals_end);
$debugger->profilerAddTotal('includes', 'inc_globals');
@@ -150,9 +143,10 @@
}
}
- safeDefine('SILENT_LOG', 0);
+ kUtil::safeDefine('SILENT_LOG', 0); // can be set in "debug.php" too
$includes = Array(
+ KERNEL_PATH . "/interfaces/cacheable.php",
KERNEL_PATH . '/application.php',
FULL_PATH . APPLICATION_PATH,
KERNEL_PATH . '/db/db_connection.php',
@@ -167,7 +161,7 @@
);
foreach ($includes as $a_file) {
- k4_include_once($a_file);
+ kUtil::includeOnce($a_file);
}
if (defined('DEBUG_MODE') && DEBUG_MODE && isset($debugger)) {