修复 按最后回复时间关闭帖子失效,变成按发帖时间关闭帖子的问题

This commit is contained in:
Coxxs 2017-03-10 07:45:04 +08:00
parent 2ed1b98ea1
commit 21fd2fd71f
1 changed files with 1 additions and 2 deletions

View File

@ -16,8 +16,7 @@ function checkautoclose($thread) {
if(!$_G['forum']['ismoderator'] && $_G['forum']['autoclose']) { if(!$_G['forum']['ismoderator'] && $_G['forum']['autoclose']) {
$closedby = $_G['forum']['autoclose'] > 0 ? 'dateline' : 'lastpost'; $closedby = $_G['forum']['autoclose'] > 0 ? 'dateline' : 'lastpost';
$_G['forum']['autoclose'] = abs($_G['forum']['autoclose']); if(TIMESTAMP - $thread[$closedby] > abs($_G['forum']['autoclose']) * 86400) {
if(TIMESTAMP - $thread[$closedby] > $_G['forum']['autoclose'] * 86400) {
return 'post_thread_closed_by_'.$closedby; return 'post_thread_closed_by_'.$closedby;
} }
} }