Fix moving of deleted files
This commit is contained in:
parent
85136b76ed
commit
65a14a0d39
@ -1199,6 +1199,8 @@ function mod_move($originBoard, $postID) {
|
||||
$post['files'] = json_decode($post['files'], TRUE);
|
||||
$post['has_file'] = true;
|
||||
foreach ($post['files'] as $i => &$file) {
|
||||
if ($file['file'] === 'deleted')
|
||||
continue;
|
||||
$file['file_path'] = sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $file['file'];
|
||||
$file['thumb_path'] = sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $file['thumb'];
|
||||
}
|
||||
@ -1218,8 +1220,9 @@ function mod_move($originBoard, $postID) {
|
||||
if ($post['has_file']) {
|
||||
// copy image
|
||||
foreach ($post['files'] as $i => &$file) {
|
||||
$clone($file['file_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $file['file']);
|
||||
if (!in_array($file['thumb'], array('spoiler', 'deleted', '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']);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user