|
|
@ -500,7 +500,9 @@ if (isset($_POST['delete'])) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ($post['has_file'] && $config['image_reject_repost'] && $p = getPostByHash($post['filehash'])) { |
|
|
|
if ($post['has_file']) { |
|
|
|
if ($config['image_reject_repost']) { |
|
|
|
if ($p = getPostByHash($post['filehash'])) { |
|
|
|
undoImage($post); |
|
|
|
error(sprintf($config['error']['fileexists'], |
|
|
|
$post['mod'] ? $config['root'] . $config['file_mod'] . '?/' : $config['root'] . |
|
|
@ -512,6 +514,21 @@ if (isset($_POST['delete'])) { |
|
|
|
) |
|
|
|
)); |
|
|
|
} |
|
|
|
} else if (!$post['op'] && $config['image_reject_repost_in_thread']) { |
|
|
|
if ($p = getPostByHashInThread($post['filehash'], $post['thread'])) { |
|
|
|
undoImage($post); |
|
|
|
error(sprintf($config['error']['fileexistsinthread'], |
|
|
|
$post['mod'] ? $config['root'] . $config['file_mod'] . '?/' : $config['root'] . |
|
|
|
$board['dir'] . $config['dir']['res'] . |
|
|
|
($p['thread'] ? |
|
|
|
$p['thread'] . '.html#' . $p['id'] |
|
|
|
: |
|
|
|
$p['id'] . '.html' |
|
|
|
) |
|
|
|
)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!hasPermission($config['mod']['postunoriginal'], $board['uri']) && $config['robot_enable'] && checkRobot($post['body_nomarkup'])) { |
|
|
|
undoImage($post); |
|
|
|