pages.php: use link to create hardlinks isntead of full file copy for thread moving

This commit is contained in:
Zankaria 2024-05-22 23:54:06 +02:00
parent 8626ab7571
commit b0b684bdb1

View File

@ -1345,8 +1345,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';
// link() if leaving a shadow thread behind; else, rename().
$clone = $shadow ? 'link' : 'rename';
// indicate that the post is a thread
$post['op'] = true;
@ -1639,7 +1639,7 @@ function mod_merge($originBoard, $postID) {
$op = $post;
$op['id'] = $newID;
$clone = $shadow ? 'copy' : 'rename';
$clone = $shadow ? 'link' : 'rename';
if ($post['has_file']) {
// copy image