From cdf48a562f28e928546eef112ea91b18feaa4bfc Mon Sep 17 00:00:00 2001 From: Zankaria Date: Wed, 24 Apr 2024 16:34:55 +0200 Subject: [PATCH] Attempt to mitigate #112, if data loss is caused by timeout due to slow copy() --- inc/mod/pages.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/inc/mod/pages.php b/inc/mod/pages.php index 5b1ceb06..3fc08491 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -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