diff options
| author | Fredrick Brennan <admin@8chan.co> | 2015-08-23 09:04:37 +0800 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2016-05-06 15:12:08 +0200 |
| commit | b476b660073adbe827836a7e7860b0fb3a061ff0 (patch) | |
| tree | a867863c39eb1254e59d9c07d3734bd8ce7f1622 /post.php | |
| parent | 2fa37278db9ad0e802a2b4c6a54c5d179ce6df35 (diff) | |
[BUG] Image reject repost board option now also affects YT embeds
Diffstat (limited to 'post.php')
| -rw-r--r-- | post.php | 28 |
1 files changed, 27 insertions, 1 deletions
@@ -294,6 +294,32 @@ if (isset($_POST['delete'])) { if (!isset($post['embed'])) { error($config['error']['invalid_embed']); } + + if ($config['image_reject_repost']) { + if ($p = getPostByEmbed($post['embed'])) { + 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' + )) + )); + } + } else if (!$post['op'] && $config['image_reject_repost_in_thread']) { + if ($p = getPostByEmbedInThread($post['embed'], $post['thread'])) { + 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']['bypass_field_disable'], $board['uri'])) { @@ -798,7 +824,7 @@ if (isset($_POST['delete'])) { )); } } - } + } if (!hasPermission($config['mod']['postunoriginal'], $board['uri']) && $config['robot_enable'] && checkRobot($post['body_nomarkup'])) { undoImage($post); |
