// Routes for dispatcher (part 4) + some fix

This commit is contained in:
rMalie
2011-08-01 13:28:02 +00:00
parent 83e1aa387d
commit 66eab15a18
21 changed files with 298 additions and 264 deletions
+2 -9
View File
@@ -100,18 +100,11 @@ Language::loadLanguages();
$defaultCountry = new Country(Configuration::get('PS_COUNTRY_DEFAULT'), Configuration::get('PS_LANG_DEFAULT'));
/* Instantiate cookie */
$cookieLifetime = (time() + (((int)Configuration::get('PS_COOKIE_LIFETIME_BO') > 0 ? (int)Configuration::get('PS_COOKIE_LIFETIME_BO') : 1)* 3600));
if (defined('PS_ADMIN_DIR'))
{
$currentFileName = array_reverse(explode("/", $_SERVER['SCRIPT_NAME']));
$cookieLifetime = (time() + (((int)Configuration::get('PS_COOKIE_LIFETIME_BO') > 0 ? (int)Configuration::get('PS_COOKIE_LIFETIME_BO') : 1)* 3600));
$cookie = new Cookie('psAdmin', substr($_SERVER['SCRIPT_NAME'], strlen(__PS_BASE_URI__), -strlen($currentFileName['0'])), $cookieLifetime);
}
$cookie = new Cookie('psAdmin', '', $cookieLifetime);
else
{
$defaultCountry = new Country((int)Configuration::get('PS_COUNTRY_DEFAULT'), Configuration::get('PS_LANG_DEFAULT'));
$cookieLifetime = (time() + (((int)Configuration::get('PS_COOKIE_LIFETIME_FO') > 0 ? (int)Configuration::get('PS_COOKIE_LIFETIME_FO') : 1)* 3600));
$cookie = new Cookie('ps', '', $cookieLifetime);
}
Context::getContext()->cookie = $cookie;
/* Instantiate language */