mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 08:12:17 +09:00
Fix #1505 duration limit to combined boards
- 통합게시판 글을 모을 기간을 설정할 수 있도록 함 - 통합게시판 소속이 아니거나 기간을 벗어나는 글 발견시 실제 게시판 주소로 redirect
This commit is contained in:
parent
89240196c3
commit
88907fa9df
14 changed files with 53 additions and 6 deletions
|
|
@ -182,7 +182,12 @@ class boardView extends board
|
|||
}
|
||||
|
||||
// display the board content
|
||||
$this->dispBoardContentView();
|
||||
$output = $this->dispBoardContentView();
|
||||
if ($output instanceof DocumentItem)
|
||||
{
|
||||
$this->setRedirectUrl($output->getPermanentUrl());
|
||||
return;
|
||||
}
|
||||
|
||||
// list config, columnList setting
|
||||
$this->listConfig = BoardModel::getListConfig($this->module_info->module_srl);
|
||||
|
|
@ -251,7 +256,14 @@ class boardView extends board
|
|||
{
|
||||
if (!in_array($oDocument->get('module_srl'), $this->include_modules))
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
return $oDocument;
|
||||
}
|
||||
if (isset($this->module_info->include_days) && $this->module_info->include_days > 0)
|
||||
{
|
||||
if ($oDocument->get('regdate') < date('YmdHis', time() - ($this->module_info->include_days * 86400)))
|
||||
{
|
||||
return $oDocument;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -480,6 +492,10 @@ class boardView extends board
|
|||
$args->page = intval(Context::get('page')) ?: null;
|
||||
$args->list_count = $this->list_count;
|
||||
$args->page_count = $this->page_count;
|
||||
if (isset($this->module_info->include_days) && $this->module_info->include_days > 0)
|
||||
{
|
||||
$args->start_regdate = date('YmdHis', time() - ($this->module_info->include_days * 86400));
|
||||
}
|
||||
|
||||
// get the search target and keyword
|
||||
if ($this->grant->view)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue