summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2013-08-03 19:05:25 -0400
committerczaks <marcin@6irc.net>2013-08-03 19:05:25 -0400
commita0855cdcf5634d64fbb1ba294b05c8365ce37338 (patch)
treefa1217beedf487c321405432ea746343ec6afcec /post.php
parent7d5fef9ace3bba46de40604b04ea2dee1dac7cb3 (diff)
parenta3fbff225927469e68efc7ab31977736f34c7480 (diff)
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
Conflicts: inc/config.php inc/functions.php templates/generic_page.html templates/index.html
Diffstat (limited to 'post.php')
-rw-r--r--post.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/post.php b/post.php
index 254b8a52..b35f33e2 100644
--- a/post.php
+++ b/post.php
@@ -218,7 +218,7 @@ if (isset($_POST['delete'])) {
}
if (!$post['mod']) {
- $post['antispam_hash'] = checkSpam(array($board['uri'], isset($post['thread']) && !($config['quick_reply'] && isset($_POST['quick-reply'])) ? $post['thread'] : null));
+ $post['antispam_hash'] = checkSpam(array($board['uri'], isset($post['thread']) && !($config['quick_reply'] && isset($_POST['quick-reply'])) ? $post['thread'] : ($config['try_smarter'] && isset($_POST['page']) ? 0 - (int)$_POST['page'] : null)));
if ($post['antispam_hash'] === true)
error($config['error']['spam']);
}
@@ -430,7 +430,7 @@ if (isset($_POST['delete'])) {
$post['filehash'] = $config['file_hash']($upload);
$post['filesize'] = filesize($upload);
- if ($is_an_image) {
+ if ($is_an_image && $config['ie_mime_type_detection'] !== false) {
// Check IE MIME type detection XSS exploit
$buffer = file_get_contents($upload, null, null, null, 255);
if (preg_match($config['ie_mime_type_detection'], $buffer)) {
@@ -596,12 +596,15 @@ if (isset($_POST['delete'])) {
}
}
- buildThread($post['op'] ? $id : $post['thread']);
-
if (!$post['op'] && strtolower($post['email']) != 'sage' && !$thread['sage'] && ($config['reply_limit'] == 0 || $numposts['replies']+1 < $config['reply_limit'])) {
bumpThread($post['thread']);
}
+ buildThread($post['op'] ? $id : $post['thread']);
+
+ if ($config['try_smarter'] && $post['op'])
+ $build_pages = range(1, $config['max_pages']);
+
if ($post['op'])
clean();