Add option to customize the number of days until a document is considered old

This commit is contained in:
Kijin Sung 2019-09-14 21:31:47 +09:00
parent 0fdb48c31a
commit 72651ed095
3 changed files with 6 additions and 2 deletions

View file

@ -534,7 +534,8 @@ class boardView extends board
$oDocument = $oDocumentModel->getDocument($document_srl);
if($oDocument->isExists() && !$oDocument->isNotice())
{
if($oDocument->getRegdateTime() < (time() - (86400 * 30)) && $this->module_info->skip_bottom_list_for_olddoc === 'Y')
$days = $this->module_info->skip_bottom_list_days ?: 30;
if($oDocument->getRegdateTime() < (time() - (86400 * $days)) && $this->module_info->skip_bottom_list_for_olddoc === 'Y')
{
Context::set('page', $args->page = null);
}