/** * Starts or continue existing session * * @param unknown_type $checkRedirectFunc */ function OA_Start($checkRedirectFunc = null) { $conf = $GLOBALS['_MAX']['CONF']; global $session; // XXX: Why not try loading session data when OpenX is not installed? //if ($conf['openads']['installed']) if (OA_INSTALLATION_STATUS == OA_INSTALLATION_STATUS_INSTALLED) { phpAds_SessionDataFetch(); } if (!OA_Auth::isLoggedIn() || OA_Auth::suppliedCredentials()) { // Required files include_once MAX_PATH . '/lib/max/language/Loader.php'; // Load the required language files Language_Loader::load('default'); phpAds_SessionDataRegister(OA_Auth::login($checkRedirectFunc)); $aPlugins = OX_Component::getListOfRegisteredComponentsForHook('afterLogin'); foreach ($aPlugins as $i => $id) { if ($obj = OX_Component::factoryByComponentIdentifier($id)) { $obj->afterLogin(); } } } // Overwrite certain preset preferences if (!empty($session['language']) && $session['language'] != $GLOBALS['pref']['language']) { $GLOBALS['_MAX']['CONF']['max']['language'] = $session['language']; } // Check if manual account switch has happened and migrate to new global variable if (isset($session['accountSwitch'])) { $GLOBALS['_OX']['accountSwtich'] = $session['accountSwitch']; unset($session['accountSwitch']); phpAds_SessionDataStore(); } }
/** * Starts or continue existing session * * @param unknown_type $checkRedirectFunc */ function OA_Start($checkRedirectFunc = null) { $conf = $GLOBALS['_MAX']['CONF']; global $session; // Send no cache headers MAX_header('Pragma: no-cache'); MAX_header('Cache-Control: no-cache, no-store, must-revalidate'); MAX_header('Expires: 0'); if (RV_INSTALLATION_STATUS == RV_INSTALLATION_STATUS_INSTALLED) { phpAds_SessionDataFetch(); } if (!OA_Auth::isLoggedIn() || OA_Auth::suppliedCredentials()) { // Required files include_once MAX_PATH . '/lib/max/language/Loader.php'; // Load the required language files Language_Loader::load('default'); phpAds_SessionDataRegister(OA_Auth::login($checkRedirectFunc)); $aPlugins = OX_Component::getListOfRegisteredComponentsForHook('afterLogin'); foreach ($aPlugins as $i => $id) { if ($obj = OX_Component::factoryByComponentIdentifier($id)) { $obj->afterLogin(); } } } // Overwrite certain preset preferences if (!empty($session['language']) && $session['language'] != $GLOBALS['pref']['language']) { $GLOBALS['_MAX']['CONF']['max']['language'] = $session['language']; } // Check if manual account switch has happened and migrate to new global variable if (isset($session['accountSwitch'])) { $GLOBALS['_OX']['accountSwtich'] = $session['accountSwitch']; unset($session['accountSwitch']); phpAds_SessionDataStore(); } }