소스 검색

! One more error found by Illori to the post validator

Signed-off-by: John Rayes <[email protected]>
John Rayes 12 년 전
부모
커밋
4c7f50e0d9
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      Sources/Post.php

+ 4 - 0
Sources/Post.php

@@ -142,6 +142,10 @@ function Post($post_errors = array())
 
 		$context['notify'] = !empty($context['notify']);
 		$context['sticky'] = isset($_REQUEST['sticky']) ? !empty($_REQUEST['sticky']) : $sticky;
+
+		// Check whether this is a really old post being bumped...
+		if (!empty($modSettings['oldTopicDays']) && $lastPostTime + $modSettings['oldTopicDays'] * 86400 < time() && empty($sticky) && !isset($_REQUEST['subject']))
+			$post_errors[] = array('old_topic', array($modSettings['oldTopicDays']));
 	}
 	else
 	{