|
|
@ -1344,12 +1344,8 @@ function mod_move_reply($originBoard, $postID) { |
|
|
|
|
|
|
|
if ($post['has_file'] && $board_move) { |
|
|
|
foreach ($post['files'] as $i => &$file) { |
|
|
|
// move the image |
|
|
|
if (isset($file['thumb'])) |
|
|
|
if ($file['thumb'] != 'spoiler' || $file['thumb'] != 'deleted') { //trying to move/copy the spoiler thumb raises an error |
|
|
|
rename($file['file_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $file['file']); |
|
|
|
rename($file['thumb_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $file['thumb']); |
|
|
|
} |
|
|
|
// move images |
|
|
|
clone_files(rename, $file, $board['uri']); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -1466,12 +1462,9 @@ function mod_move($originBoard, $postID) { |
|
|
|
$op['id'] = $newID; |
|
|
|
|
|
|
|
if ($post['has_file']) { |
|
|
|
// copy image |
|
|
|
// copy images |
|
|
|
foreach ($post['files'] as $i => &$file) { |
|
|
|
if ($file['file'] !== 'deleted') |
|
|
|
$clone($file['file_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $file['file']); |
|
|
|
if (isset($file['thumb']) && !in_array($file['thumb'], array('spoiler', 'deleted', 'file'))) |
|
|
|
$clone($file['thumb_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $file['thumb']); |
|
|
|
clone_files($clone, $file, $board['uri']); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -1532,13 +1525,9 @@ function mod_move($originBoard, $postID) { |
|
|
|
$post['tracked_cites'] = markup($post['body'], true); |
|
|
|
|
|
|
|
if ($post['has_file']) { |
|
|
|
// copy image |
|
|
|
// copy images |
|
|
|
foreach ($post['files'] as $i => &$file) { |
|
|
|
if (isset($file['thumb'])) |
|
|
|
if ($file['thumb'] != 'spoiler' || $file['thumb'] != 'deleted') { //trying to move/copy the spoiler thumb raises an error |
|
|
|
$clone($file['file_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $file['file']); |
|
|
|
$clone($file['thumb_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $file['thumb']); |
|
|
|
} |
|
|
|
clone_files($clone, $file, $board['uri']); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -1736,12 +1725,9 @@ function mod_merge($originBoard, $postID) { |
|
|
|
$op['id'] = $newID; |
|
|
|
|
|
|
|
if ($post['has_file']) { |
|
|
|
// copy image |
|
|
|
// copy images |
|
|
|
foreach ($post['files'] as $i => &$file) { |
|
|
|
if ($file['file'] !== 'deleted') |
|
|
|
$clone($file['file_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $file['file']); |
|
|
|
if (isset($file['thumb']) && !in_array($file['thumb'], array('spoiler', 'deleted', 'file'))) |
|
|
|
$clone($file['thumb_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $file['thumb']); |
|
|
|
clone_files($clone, $file, $board['uri']); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -1800,10 +1786,9 @@ function mod_merge($originBoard, $postID) { |
|
|
|
$post['tracked_cites'] = markup($post['body'], true); |
|
|
|
|
|
|
|
if ($post['has_file']) { |
|
|
|
// copy image |
|
|
|
// copy images |
|
|
|
foreach ($post['files'] as $i => &$file) { |
|
|
|
$clone($file['file_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $file['file']); |
|
|
|
$clone($file['thumb_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $file['thumb']); |
|
|
|
clone_files($clone, $file, $board['uri']); |
|
|
|
} |
|
|
|
} |
|
|
|
// insert reply |
|
|
|