if( !isset(self::$request['section']) )
{
self::$request['section'] = '';
}
# Assign request method
self::$request['request_method'] = strtolower( my_getenv('REQUEST_METHOD') );
/* Define some constants */
define( 'IPS_IS_TASK', ( isset( self::$request['module'] ) AND self::$request['module'] == 'task' AND self::$request['app'] == 'core' ) ? TRUE : FALSE );
define( 'IPS_IS_AJAX', ( isset( self::$request['module'] ) AND self::$request['module'] == 'ajax' ) ? TRUE : FALSE );
/* First pass of app set up. Needs to be BEFORE caches and member are set up */
self::_fUrlInit();
self::_manageIncomingURLs();
/* _manageIncomingURLs MUST be called first!!! */
self::_setUpAppData();
/* Load app / coreVariables.. must be called after app Data */
self::_loadAppCoreVariables( IPS_APP_COMPONENT );
/* Must be called after _manageIncomingURLs */
self::$handles['db']->getDB()->setDebugMode( ( IPS_SQL_DEBUG_MODE ) ? ( isset($_GET['debug']) ? intval($_GET['debug']) : 0 ) : 0 );
/* Get caches */
self::$handles['caches'] = ips_CacheRegistry::instance();
/* Make sure all is well before we proceed */
try
{
self::instance()->setUpSettings();
}
catch( Exception $e )
{
file_get_contents( DOC_IPS_ROOT_PATH .'cache/skin_cache/settingsEmpty.html' )
}