Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1092767
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
Mon, Aug 11, 12:03 AM
Size
4 KB
Mime Type
text/x-diff
Expires
Wed, Aug 13, 12:03 AM (12 h, 28 m)
Engine
blob
Format
Raw Data
Handle
707738
Attached To
rINP In-Portal
in-portal
View Options
Index: trunk/core/kernel/startup.php
===================================================================
--- trunk/core/kernel/startup.php (revision 2749)
+++ trunk/core/kernel/startup.php (revision 2750)
@@ -1,110 +1,115 @@
<?php
define('KERNEL_PATH', FULL_PATH.'/kernel/kernel4');
if( defined('ADMIN') && ADMIN )
{
define('SPECIAL_TEMPLATES_FOLDER', '/kernel/admin_templates');
}
define('INPORTAL_ENV', 1);
# New path detection method
-$ps = preg_replace("/\/admin$/", '', str_replace('\\', '/', dirname($_SERVER['PHP_SELF'])));
+
+if (!defined('REL_PATH')) {
+ define('REL_PATH', '/admin');
+}
+
+$ps = preg_replace("/".preg_quote(rtrim(REL_PATH, '/'), '/')."$/", '', str_replace('\\', '/', dirname($_SERVER['PHP_SELF'])));
define('BASE_PATH', $ps);
# /New method
include_once(KERNEL_PATH.'/globals.php'); // non OOP functions used through kernel, e.g. print_pre
safeDefine( 'INPORTAL_TAGS', true);
safeDefine( 'SERVER_NAME', $_SERVER['HTTP_HOST']);
safeDefine( 'KERNEL_PATH', FULL_PATH.'/kernel4');
safeDefine( 'PROTOCOL', isset($_SERVER["HTTPS"]) ? '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>';
if ( !preg_match('/admin/', __FILE__) ) $ins = '/admin';
echo '<a href="'.PROTOCOL.SERVER_NAME.BASE_PATH.$ins.'/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', $vars['Domain']);
ini_set('memory_limit', '50M');
/*echo "FULL_PATH: ".FULL_PATH.'<br>';
echo "BASE_PATH: ".BASE_PATH.'<br>';*/
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
safeDefine('ENV_VAR_NAME','env');
k4_include_once(KERNEL_PATH.'/application.php');
k4_include_once(MODULES_PATH.'/kernel/units/general/my_application.php');
if( file_exists(FULL_PATH.'/debug.php') )
{
k4_include_once(FULL_PATH.'/debug.php');
if( defined('DEBUG_MODE') && DEBUG_MODE ) include_once(KERNEL_PATH.'/utility/debugger.php');
}
k4_include_once(KERNEL_PATH.'/db/db_connection.php');
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('CACHE_CONFIGS_FILES', 1);
safeDefine('EXPERIMENTAL_PRE_PARSE', 1);
safeDefine('SILENT_LOG', 0);
k4_include_once(KERNEL_PATH."/kbase.php");
k4_include_once(KERNEL_PATH.'/utility/event.php');
k4_include_once(KERNEL_PATH."/utility/factory.php");
k4_include_once(KERNEL_PATH."/languages/phrases_cache.php");
// We should get rid of these includes:
k4_include_once(KERNEL_PATH."/db/dblist.php");
k4_include_once(KERNEL_PATH."/db/dbitem.php");
k4_include_once(KERNEL_PATH.'/processors/tag_processor.php');
k4_include_once(KERNEL_PATH."/db/db_tag_processor.php");
k4_include_once(KERNEL_PATH."/event_handler.php");
k4_include_once(KERNEL_PATH.'/db/db_event_handler.php');
k4_include_once(MODULES_PATH.'/kernel/units/general/inp_db_event_handler.php');
k4_include_once(KERNEL_PATH."/utility/temp_handler.php"); // needed because of static calls from kBase
// up to here
// global constants
define('HAVING_FILTER', 1);
define('WHERE_FILTER', 2);
define('FLT_TYPE_AND', 'AND');
define('FLT_TYPE_OR', 'OR');
safeDefine('STATUS_DISABLED', 0);
safeDefine('STATUS_ACTIVE', 1);
safeDefine('STATUS_PENDING', 2);
?>
\ No newline at end of file
Property changes on: trunk/core/kernel/startup.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.25
\ No newline at end of property
+1.26
\ No newline at end of property
Event Timeline
Log In to Comment