mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 05:42:13 +09:00
Add point exception for reading notices #1124
This commit is contained in:
parent
26b494f1e5
commit
bc14eecd50
5 changed files with 48 additions and 23 deletions
|
|
@ -469,7 +469,7 @@ class pointController extends point
|
|||
}
|
||||
|
||||
// Give no points if the document is older than a configured limit.
|
||||
$regdate = ztime(getModel('document')->getDocument($obj->document_srl)->get('regdate'));
|
||||
$regdate = ztime($obj->get('regdate'));
|
||||
$config = $this->getConfig();
|
||||
if ($config->read_document_limit > 0 && $regdate < RX_TIME - ($config->read_document_limit * 86400))
|
||||
{
|
||||
|
|
@ -480,6 +480,19 @@ class pointController extends point
|
|||
$author_point = 0;
|
||||
}
|
||||
|
||||
// Give no points if the document is a notice and an exception has been configured.
|
||||
if ($obj->get('is_notice') === 'Y')
|
||||
{
|
||||
if ($config->read_document_except_notice)
|
||||
{
|
||||
$reader_point = 0;
|
||||
}
|
||||
if ($config->read_document_author_except_notice)
|
||||
{
|
||||
$author_point = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Adjust points of the reader.
|
||||
if ($reader_point)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue