mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-01-19 09:27:24 +01:00
might fix moving replies with deleted image
brace yourself for other conflicts lol
This commit is contained in:
parent
0b84fc26d6
commit
0846d0c784
@ -1185,9 +1185,10 @@ function mod_move_reply($originBoard, $postID) {
|
||||
if ($post['has_file']) {
|
||||
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']);
|
||||
if ($file['thumb'] != 'spoiler') { //trying to move/copy the spoiler thumb raises an error
|
||||
rename($file['thumb_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $file['thumb']);
|
||||
rename($file['thumb_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $file['thumb']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1355,9 +1356,11 @@ 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 ($file['thumb'] != 'spoiler') { //trying to move/copy the spoiler thumb raises an error
|
||||
$clone($file['thumb_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $file['thumb']);
|
||||
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']);
|
||||
}
|
||||
}
|
||||
}
|
||||
// insert reply
|
||||
|
Loading…
x
Reference in New Issue
Block a user