mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Merge pull request #1203 from sejin7940/point_readed
포인트 부족 시 글 열람 금지 설정해도, 글을 볼 수 있는 버그 패치
This commit is contained in:
commit
b0814b652d
2 changed files with 6 additions and 1 deletions
|
|
@ -876,7 +876,10 @@ class documentController extends document
|
|||
}
|
||||
|
||||
// Register session
|
||||
$_SESSION['readed_document'][$document_srl] = true;
|
||||
if(!$_SESSION['banned_document'][$document_srl])
|
||||
{
|
||||
$_SESSION['readed_document'][$document_srl] = true;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -420,10 +420,12 @@ class pointController extends point
|
|||
// Get the defaul configurations of the Point Module
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
// When the requested points are negative, compared it with the current point
|
||||
$_SESSION['banned_document'][$obj->document_srl] = false;
|
||||
if($config->disable_read_document == 'Y' && $point < 0 && abs($point)>$cur_point)
|
||||
{
|
||||
$message = sprintf(Context::getLang('msg_disallow_by_point'), abs($point), $cur_point);
|
||||
$obj->add('content', $message);
|
||||
$_SESSION['banned_document'][$obj->document_srl] = true;
|
||||
return new Object(-1, $message);
|
||||
}
|
||||
// If not logged in, pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue