} } else { define('REA_RUNMODE_PORTAL', false); } $location = isset($config->application['location_id']) ? $config->application['location_id'] : '*'; $u = rea_sp_rel2dr(REA_BASE_PATH, $location); if (substr($u, -1, 1) != '/') { $u .= '/'; } define('REA_BASE_URL', $u); define('REA_ENGINE_URL', rea_sp_rel2dr(cfgEngineFolder, $location)); define('REA_SELF_URL', $config->application['attributes']['action']); rea_app::loadStorageConnections(); $rea_controller->raiseEvent("rea_storage_configure"); $rea_controller->raiseEvent('rea_app_config_ready', array($config)); storage::dao_initializeEntries(); if (REA_RUNMODE_SERVICE) { rea_app::lock(); } //print "<b>DONE</b><br>"; function rea_sp_rel2dr($f, $location = '*') { ///N:Converts an absolute path to relative assuming is under document root $s = str_replace($_SERVER['DOCUMENT_ROOT'], '', $f); if (substr($s, 0, 1) != '/') { $s = '/' . $s; } if (!is_null($location) and $location != '*' and strlen($location) > 0) { $s = '/' . strtolower($location) . $s; } return $s;