From 2150551e1c61c45b9370911171410b80e4dfdf6e Mon Sep 17 00:00:00 2001 From: ayato <58212796+ayaaop@users.noreply.github.com> Date: Mon, 31 Aug 2026 17:50:05 +0500 Subject: [PATCH] fix(documents): use original display name for document copies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Я не знаю, намеренно это было сделано или нет, но когда добавляешь чужой документ к себе, почему то название присвоенного документа равно его ID --- Web/Models/Entities/Document.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Web/Models/Entities/Document.php b/Web/Models/Entities/Document.php index dd51a3f84..5cec5e670 100644 --- a/Web/Models/Entities/Document.php +++ b/Web/Models/Entities/Document.php @@ -224,7 +224,7 @@ public function copy(User $user): Document $new_document->updateHash($this_document_array["hash"]); $new_document->setOwner_hidden(1); $new_document->setCopy_of($this->getId()); - $new_document->setName($this->getId()); + $new_document->setName($this->getName()); $new_document->setOriginal_name($this->getOriginalName()); $new_document->setAccess_key(bin2hex(random_bytes(9))); $new_document->setFormat($this_document_array["format"]);