forked from leftypol/leftypol
Increased filehash
length and made the reject-post-if-image-already-exists-in-active-content thing
This commit is contained in:
parent
13ef38d7b7
commit
efa06c270e
4 changed files with 32 additions and 4 deletions
17
post.php
17
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']));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue