mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-17 09:24:17 +09:00
Improve and simplify session status detection
This commit is contained in:
parent
3f40434bbd
commit
42d864641f
6 changed files with 28 additions and 24 deletions
|
|
@ -847,7 +847,7 @@ class documentController extends document
|
|||
if($_SESSION['readed_document'][$document_srl]) return false;
|
||||
|
||||
// Pass if the author's IP address is as same as visitor's.
|
||||
if($oDocument->get('ipaddress') == $_SERVER['REMOTE_ADDR'] && Context::getInstance()->isSessionStarted)
|
||||
if($oDocument->get('ipaddress') == $_SERVER['REMOTE_ADDR'] && Context::getSessionStatus())
|
||||
{
|
||||
$_SESSION['readed_document'][$document_srl] = true;
|
||||
return false;
|
||||
|
|
@ -886,7 +886,7 @@ class documentController extends document
|
|||
}
|
||||
|
||||
// Register session
|
||||
if(!$_SESSION['banned_document'][$document_srl] && Context::getInstance()->isSessionStarted)
|
||||
if(!$_SESSION['banned_document'][$document_srl] && Context::getSessionStatus())
|
||||
{
|
||||
$_SESSION['readed_document'][$document_srl] = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue