Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F925892
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
Wed, May 21, 12:59 AM
Size
8 KB
Mime Type
text/x-diff
Expires
Fri, May 23, 12:59 AM (22 h, 1 m)
Engine
blob
Format
Raw Data
Handle
635166
Attached To
rINP In-Portal
in-portal
View Options
Index: branches/unlabeled/unlabeled-1.39.2/kernel/startup.php
===================================================================
--- branches/unlabeled/unlabeled-1.39.2/kernel/startup.php (revision 4375)
+++ branches/unlabeled/unlabeled-1.39.2/kernel/startup.php (revision 4376)
@@ -1,229 +1,215 @@
<?php
if( !defined('FULL_PATH') ) define('FULL_PATH', realpath(dirname(__FILE__).'/..') );
require_once FULL_PATH.'/globals.php';
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);
}
if ( !defined('APPLICATION_CLASS') ) {
define('APPLICATION_CLASS', 'MyApplication');
}
include_once(FULL_PATH.'/kernel/kernel4/startup.php');
// just to make sure that this is correctly detected
if ( IsDebugMode() ) {
$debugger->printConstants('FULL_PATH,SQL_DB');
}
$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)
{
foreach($a as $k => $v)
{
$a[$k] = is_array($v) ? addSlashesA($v) : addslashes($v);
}
return $a;
}
foreach(Array(
'HTTP_GET_VARS','HTTP_POST_VARS','HTTP_COOKIE_VARS','HTTP_SESSION_VARS','HTTP_SERVER_VARS',
'_POST','_GET','_COOKIE','_SESSION','_SERVER','_REQUEST') as $_)
if(isset($GLOBALS[$_]))
$GLOBALS[$_]=addSlashesA($GLOBALS[$_]);
}
/*
startup.php: this is the primary startup sequence for in-portal services
*/
if( file_exists(FULL_PATH.'/debug.php') && !defined('DEBUG_MODE') ) include_once(FULL_PATH.'/debug.php');
if( !defined('DEBUG_MODE') ) error_reporting(0);
ini_set('memory_limit', '32M');
ini_set('include_path', '.');
$kernel_version = "1.0.0";
$FormError = array();
$FormValues = array();
/* include PHP version compatibility functions */
require_once(FULL_PATH.'/compat.php');
/* set global variables and module lists */
if( constOn('DEBUG_MODE') ) include_once(FULL_PATH.'/kernel/include/debugger.php');
// put all non-checked checkboxes in $_POST & $_REQUEST with 0 values
if( GetVar('form_fields') )
{
$form_fields = GetVar('form_fields');
foreach($form_fields as $checkbox_name)
{
if( GetVar($checkbox_name) === false ) SetVar($checkbox_name,0);
}
}
LogEntry("Initalizing System..\n");
/* for 64 bit timestamps */
if( !function_exists('adodb_mktime') ) require_once(FULL_PATH.'/kernel/include/adodb/adodb-time.inc.php');
require_once(FULL_PATH.'/kernel/include/dates.php');
/* create the global error object */
require_once(FULL_PATH.'/kernel/include/error.php');
$Errors = new clsErrorManager();
require_once(FULL_PATH.'/kernel/include/itemdb.php');
require_once(FULL_PATH.'/kernel/include/db.class.php'); // moved from kernel/include/config.php
require_once(FULL_PATH.'/kernel/include/adodb/adodb.inc.php'); // moved from kernel/include/config.php
require_once(FULL_PATH.'/kernel/include/config.php');
/* create the global configuration object */
LogEntry("Creating Config Object..\n");
$objConfig = new clsConfig();
$objConfig->Load(); /* Populate our configuration data */
LogEntry("Done Loading Configuration\n");
if( defined('ADODB_EXTENSION') && constant('ADODB_EXTENSION') > 0 )
LogEntry("ADO Extension: ".ADODB_EXTENSION."\n");
require_once(FULL_PATH.'/kernel/include/parseditem.php');
require_once(FULL_PATH.'/kernel/include/itemreview.php'); // moved from kernel/include/item.php
require_once(FULL_PATH.'/kernel/include/itemrating.php'); // moved from kernel/include/item.php
require_once(FULL_PATH.'/kernel/include/item.php');
require_once(FULL_PATH.'/kernel/include/syscache.php');
require_once(FULL_PATH.'/kernel/include/modlist.php');
require_once(FULL_PATH.'/kernel/include/searchconfig.php');
require_once(FULL_PATH.'/kernel/include/banrules.php');
$objModules = new clsModList();
$objSystemCache = new clsSysCacheList();
$objSystemCache->PurgeExpired();
$objBanList = new clsBanRuleList();
require_once(FULL_PATH.'/kernel/include/image.php');
require_once(FULL_PATH.'/kernel/include/itemtypes.php');
$objItemTypes = new clsItemTypeList();
require_once(FULL_PATH.'/kernel/include/theme.php');
$objThemes = new clsThemeList();
require_once(FULL_PATH.'/kernel/include/language.php');
$objLanguages = new clsLanguageList();
$objImageList = new clsImageList();
/* Load session and user class definitions */
//require_once("include/customfield.php");
//require_once("include/custommetadata.php");
require_once(FULL_PATH.'/kernel/include/usersession.php');
require_once(FULL_PATH.'/kernel/include/favorites.php');
require_once(FULL_PATH.'/kernel/include/portaluser.php');
require_once(FULL_PATH.'/kernel/include/portalgroup.php');
/* create the user management class */
$objFavorites = new clsFavoriteList();
$objUsers = new clsUserManager();
$objGroups = new clsGroupList();
require_once(FULL_PATH.'/kernel/include/cachecount.php');
require_once(FULL_PATH.'/kernel/include/customfield.php');
require_once(FULL_PATH.'/kernel/include/custommetadata.php');
require_once(FULL_PATH.'/kernel/include/permissions.php');
require_once(FULL_PATH.'/kernel/include/relationship.php');
require_once(FULL_PATH.'/kernel/include/category.php');
require_once(FULL_PATH.'/kernel/include/statitem.php');
/* category base class, used by all the modules at some point */
$objPermissions = new clsPermList();
$objPermCache = new clsPermCacheList();
$objCatList = new clsCatList();
$objCustomFieldList = new clsCustomFieldList();
$objCustomDataList = new clsCustomDataList();
$objCountCache = new clsCacheCountList();
require_once(FULL_PATH.'/kernel/include/smtp.php');
require_once(FULL_PATH.'/kernel/include/emailmessage.php');
require_once(FULL_PATH.'/kernel/include/events.php');
LogEntry("Creating Mail Queue..\n");
$objMessageList = new clsEmailMessageList();
$objEmailQueue = new clsEmailQueue();
LogEntry("Done creating Mail Queue Objects\n");
require_once(FULL_PATH.'/kernel/include/searchitems.php');
require_once(FULL_PATH.'/kernel/include/advsearch.php');
require_once(FULL_PATH.'/kernel/include/parse.php');
require_once(FULL_PATH.'/kernel/include/socket.php');
/* responsible for including module code as required
This script also creates an instance of the user session onject and
handles all session management. The global session object is created
and populated, then the global user object is created and populated
each module's parser functions and action code is included here
*/
LogEntry("Startup complete\n");
include_once("include/modules.php");
if( IsDebugMode() && function_exists('DebugByFile') ) DebugByFile();
/* startup is complete, so now check the mail queue to see if there's anything that needs to be sent*/
$objEmailQueue->SendMailQeue();
$ado=&GetADODBConnection();
$rs = $ado->Execute("SELECT * FROM ".GetTablePrefix()."Modules WHERE LoadOrder = 0");
$kernel_version = $rs->fields['Version'];
$adminDir = $objConfig->Get("AdminDirectory");
if ($adminDir == '') {
$adminDir = 'admin';
}
/*if (strstr(__FILE__, $adminDir) && !GetVar('logout') && !strstr(__FILE__, "install") && !strstr(__FILE__, "index")) {
require_login(null, 'expired='.(int)GetVar('expired') );
}*/
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.39.2/kernel/startup.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.39
\ No newline at end of property
+1.39.2.1
\ No newline at end of property
Event Timeline
Log In to Comment