summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2011-02-19 19:45:54 +1100
committerSavetheinternet <savetheinternet@n0v4.com>2011-02-19 19:45:54 +1100
commitefa06c270e69e012c43368dfa05e51970762e59b (patch)
tree9cd2cfb121f3db89c04ceab6e07c116bd85f2280 /post.php
parent13ef38d7b72085dbf436fa62f1b5ae76a88df3bd (diff)
Increased `filehash` length and made the reject-post-if-image-already-exists-in-active-content thing
Diffstat (limited to 'post.php')
-rw-r--r--post.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/post.php b/post.php
index f15545bb..5ec63032 100644
--- a/post.php
+++ b/post.php
@@ -155,7 +155,7 @@
$post['mod'] = isset($_POST['mod']) && $_POST['mod'];
if(empty($post['body']) && $config['force_body'])
- error($config['error']['tooshortbody']);
+ error($config['error']['tooshort_body']);
if($post['mod']) {
require 'inc/mod.php';
@@ -277,6 +277,21 @@
}
}
+ if($config['image_reject_repost'] && $p = getPostByHash($post['filehash'])) {
+ undoImage($post);
+ error(sprintf($config['error']['fileexists'],
+ $post['mod'] ? $config['root'] . $config['file_mod'] . '?/' : $config['root'] .
+ $board['dir'] . $config['dir']['res'] .
+ ($p->thread ?
+ $p->thread . '.html#' . $p->id
+ :
+ $p->id . '.html'
+ )
+ ));
+ }
+
+ exit;
+
// Remove DIR_* before inserting them into the database.
if($post['has_file']) {
$post['file'] = substr_replace($post['file'], '', 0, strlen($board['dir'] . $config['dir']['img']));