Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1167006
in-portal
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Sep 23, 5:18 AM
Size
4 KB
Mime Type
text/x-diff
Expires
Thu, Sep 25, 5:18 AM (19 h, 25 m)
Engine
blob
Format
Raw Data
Handle
755870
Attached To
rINP In-Portal
in-portal
View Options
Index: branches/unlabeled/unlabeled-1.42.2/core/kernel/startup.php
===================================================================
--- branches/unlabeled/unlabeled-1.42.2/core/kernel/startup.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.42.2/core/kernel/startup.php (revision 4882)
@@ -0,0 +1,116 @@
+<?php
+
+ define('KERNEL_PATH', FULL_PATH.'/kernel/kernel4');
+ $globals_start = getmicrotime();
+ include_once(KERNEL_PATH.'/globals.php'); // non OOP functions used through kernel, e.g. print_pre
+ $globals_end = getmicrotime();
+
+ if( constOn('ADMIN') ) define('SPECIAL_TEMPLATES_FOLDER', '/kernel/admin_templates');
+
+ define('INPORTAL_ENV', 1);
+
+ # New path detection method: begin
+ safeDefine('REL_PATH', '/admin');
+ $ps = preg_replace("/".preg_quote(rtrim(REL_PATH, '/'), '/')."$/", '', str_replace('\\', '/', dirname($_SERVER['PHP_SELF'])));
+ safeDefine('BASE_PATH', $ps); // in case in-portal has defined it before
+ # New path detection method: end
+
+ safeDefine('INPORTAL_TAGS', true);
+ safeDefine('SERVER_NAME', $_SERVER['HTTP_HOST']);
+ safeDefine('KERNEL_PATH', FULL_PATH.'/kernel4');
+
+ $https_mark = getArrayValue($_SERVER, 'HTTPS');
+ safeDefine('PROTOCOL', ($https_mark == 'on') || ($https_mark == '1') ? 'https://' : 'http://');
+
+ $vars = parse_portal_ini(FULL_PATH.'/config.php');
+
+ if ($vars === false) {
+ global $rootURL;
+ echo 'In-Portal is probably not installed, or configuration file is missing.<br>';
+ echo 'Please use the installation script to fix the problem.<br><br>';
+ echo '<a href="'.PROTOCOL.SERVER_NAME.rtrim(BASE_PATH, '/').'/admin/install.php">Go to installation script</a><br><br>';
+ flush();
+ exit;
+ }
+
+ define('SQL_TYPE', $vars['DBType']);
+ define('SQL_SERVER', $vars['DBHost']);
+ define('SQL_USER', $vars['DBUser']);
+ define('SQL_PASS', $vars['DBUserPassword']);
+ define('SQL_DB', $vars['DBName']);
+ define('TABLE_PREFIX', $vars['TablePrefix']);
+ define('DOMAIN', getArrayValue($vars, 'Domain'));
+
+ ini_set('memory_limit', '50M');
+
+ define('MODULES_PATH', FULL_PATH);
+ define('EXPORT_PATH', FULL_PATH.'/admin/export');
+ 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', '/kernel/images/');
+ safeDefine('IMAGES_PENDING_PATH', IMAGES_PATH.'pending/');
+ safeDefine('CUSTOM_UPLOAD_PATH', '/templates/images/custom/');
+ safeDefine('MAX_UPLOAD_SIZE', min(ini_get('upload_max_filesize'), ini_get('post_max_size'))*1024*1024);
+
+ if( ini_get('safe_mode') ) define('SAFE_MODE', 1);
+
+ safeDefine('EXPERIMENTAL_PRE_PARSE', 1);
+ safeDefine('SILENT_LOG', 0);
+
+ if( file_exists(FULL_PATH.'/debug.php') )
+ {
+ include_once(FULL_PATH.'/debug.php');
+ if( constOn('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);
+ $debugger->profilerAddTotal('includes', 'inc_globals');
+
+ $debugger->profileStart('inc_debugger', KERNEL_PATH.'/utility/debugger.php', $debugger_start);
+ $debugger->profileFinish('inc_debugger', KERNEL_PATH.'/utility/debugger.php', $debugger_end);
+ $debugger->profilerAddTotal('includes', 'inc_debugger');
+ }
+ }
+ }
+
+ $includes = Array(
+ KERNEL_PATH.'/application.php',
+ MODULES_PATH.'/kernel/units/general/my_application.php',
+ KERNEL_PATH.'/db/db_connection.php',
+ KERNEL_PATH."/kbase.php",
+ KERNEL_PATH.'/utility/event.php',
+ KERNEL_PATH."/utility/factory.php",
+ KERNEL_PATH."/languages/phrases_cache.php",
+ KERNEL_PATH."/db/dblist.php",
+ KERNEL_PATH."/db/dbitem.php",
+// KERNEL_PATH.'/processors/tag_processor.php',
+// KERNEL_PATH."/db/db_tag_processor.php",
+ KERNEL_PATH."/event_handler.php",
+ KERNEL_PATH.'/db/db_event_handler.php',
+ MODULES_PATH.'/kernel/units/general/inp_db_event_handler.php',
+ );
+
+ foreach ($includes as $a_file) {
+ k4_include_once($a_file);
+ }
+
+ if (defined('DEBUG_MODE') && DEBUG_MODE && isset($debugger)) {
+ $debugger->AttachToApplication();
+ }
+
+ 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
Property changes on: branches/unlabeled/unlabeled-1.42.2/core/kernel/startup.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.42
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Event Timeline
Log In to Comment