mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-05-19 17:28:23 +03:00
Враппер для работы с куками
This commit is contained in:
parent
009a8e7827
commit
1fdc7d2398
|
@ -396,8 +396,7 @@ class ActionAjax extends Action
|
|||
}
|
||||
if (!$sTargetTmp) {
|
||||
$sTargetTmp = func_generator();
|
||||
setcookie('poll_target_tmp_' . $sTargetType, $sTargetTmp, time() + 24 * 3600,
|
||||
Config::Get('sys.cookie.path'), Config::Get('sys.cookie.host'));
|
||||
$this->Session_SetCookie('poll_target_tmp_' . $sTargetType, $sTargetTmp, time() + 24 * 3600);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -861,8 +860,7 @@ class ActionAjax extends Action
|
|||
$sType = getRequestStr('type');
|
||||
if ($this->Media_IsAllowTargetType($sType)) {
|
||||
$sTmp = func_generator();
|
||||
setcookie('media_target_tmp_' . $sType, $sTmp, time() + 24 * 3600, Config::Get('sys.cookie.path'),
|
||||
Config::Get('sys.cookie.host'));
|
||||
$this->Session_SetCookie('media_target_tmp_' . $sType, $sTmp, time() + 24 * 3600);
|
||||
$this->Viewer_AssignAjax('sTmpKey', $sTmp);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -683,7 +683,7 @@ class ModuleMedia extends ModuleORM
|
|||
$sCookieKey = 'media_target_tmp_' . $sTargetType;
|
||||
if (is_null($sTargetTmp) and isset($_COOKIE[$sCookieKey])) {
|
||||
$sTargetTmp = $_COOKIE[$sCookieKey];
|
||||
setcookie($sCookieKey, null, -1, Config::Get('sys.cookie.path'), Config::Get('sys.cookie.host'));
|
||||
$this->Session_DropCookie($sCookieKey);
|
||||
}
|
||||
if (is_string($sTargetTmp)) {
|
||||
$aTargetItems = $this->Media_GetTargetItemsByTargetTmpAndTargetType($sTargetTmp, $sTargetType);
|
||||
|
|
|
@ -131,7 +131,7 @@ class ModulePoll extends ModuleORM
|
|||
$sCookieKey = 'poll_target_tmp_' . $sTargetType;
|
||||
if (is_null($sTargetTmp) and isset($_COOKIE[$sCookieKey])) {
|
||||
$sTargetTmp = $_COOKIE[$sCookieKey];
|
||||
setcookie($sCookieKey, null, -1, Config::Get('sys.cookie.path'), Config::Get('sys.cookie.host'));
|
||||
$this->Session_DropCookie($sCookieKey);
|
||||
}
|
||||
if (is_string($sTargetTmp)) {
|
||||
$aPollItems = $this->Poll_GetPollItemsByTargetTmpAndTargetType($sTargetTmp, $sTargetType);
|
||||
|
|
|
@ -577,8 +577,7 @@ class ModuleUser extends Module
|
|||
* Ставим куку
|
||||
*/
|
||||
if ($bRemember) {
|
||||
setcookie('key', $sKey, time() + Config::Get('sys.cookie.time'), Config::Get('sys.cookie.path'),
|
||||
Config::Get('sys.cookie.host'), false, true);
|
||||
$this->Session_SetCookie('key', $sKey, time() + Config::Get('sys.cookie.time'), false, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -655,7 +654,7 @@ class ModuleUser extends Module
|
|||
/**
|
||||
* Дропаем куку
|
||||
*/
|
||||
setcookie('key', '', 1, Config::Get('sys.cookie.path'), Config::Get('sys.cookie.host'));
|
||||
$this->Session_DropCookie('key');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit e688449340fb1f8e07882708754c2cfcd633c8ef
|
||||
Subproject commit 3e127585dae353932e9551bfc8b82c6c6ea804d2
|
Loading…
Reference in a new issue