|
@ -1199,6 +1199,8 @@ function mod_move($originBoard, $postID) { |
|
|
$post['files'] = json_decode($post['files'], TRUE); |
|
|
$post['files'] = json_decode($post['files'], TRUE); |
|
|
$post['has_file'] = true; |
|
|
$post['has_file'] = true; |
|
|
foreach ($post['files'] as $i => &$file) { |
|
|
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['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']; |
|
|
$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']) { |
|
|
if ($post['has_file']) { |
|
|
// copy image |
|
|
// copy image |
|
|
foreach ($post['files'] as $i => &$file) { |
|
|
foreach ($post['files'] as $i => &$file) { |
|
|
$clone($file['file_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $file['file']); |
|
|
if ($file['file'] !== 'deleted') |
|
|
if (!in_array($file['thumb'], array('spoiler', 'deleted', 'file'))) |
|
|
$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($file['thumb_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $file['thumb']); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|