Attempt to mitigate #112, if data loss is caused by timeout due to slow copy()

This commit is contained in:
Zankaria 2024-04-24 16:34:55 +02:00
parent 6863db49ef
commit cdf48a562f

View File

@ -1340,8 +1340,8 @@ function mod_move($originBoard, $postID) {
if ($targetBoard === $originBoard)
error(_('Target and source board are the same.'));
// copy() if leaving a shadow thread behind; else, rename().
$clone = $shadow ? 'copy' : 'rename';
// Fake copy if leaving a shadow thread behind; else, rename().
$clone = $shadow ? 'link' : 'rename';
// indicate that the post is a thread
$post['op'] = true;
@ -1634,7 +1634,8 @@ function mod_merge($originBoard, $postID) {
$op = $post;
$op['id'] = $newID;
$clone = $shadow ? 'copy' : 'rename';
// Fake copy if leaving a shadow thread behind; else, rename().
$clone = $shadow ? 'link' : 'rename';
if ($post['has_file']) {
// copy image