Merge pull request !66 from Coxxs/fix/closepolicy

This commit is contained in:
Coxxs 2017-03-10 09:37:30 +08:00 committed by Discuz!
commit abddc82c79
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;
} }
} }