From b9af5af789c7200bc14a383a31110f6e222f6eca Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 11 Apr 2021 14:56:35 +0200 Subject: Copy filename when repasting file Signed-off-by: Florian Pritz --- NEWS | 1 + application/controllers/Main.php | 1 + application/views/file/upload_form.php | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 3ffce0f1d..e507b4dd9 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ This file lists major, incompatible or otherwise important changes, you should look at it after every update. NEXT + - Copy filename when repasting file - Add link to new android client 3.6.0 2021-02-21 diff --git a/application/controllers/Main.php b/application/controllers/Main.php index 9db63b39f..df3e8ad78 100644 --- a/application/controllers/Main.php +++ b/application/controllers/Main.php @@ -468,6 +468,7 @@ class Main extends MY_Controller { if ($filedata !== false) { $pygments = new \libraries\Pygments($this->mfile->file($filedata["data_id"]), $filedata["mimetype"], $filedata["filename"]); if ($pygments->can_highlight()) { + $this->data["textarea_filename"] = $filedata["filename"]; $this->data["textarea_content"] = file_get_contents($this->mfile->file($filedata["data_id"])); } } diff --git a/application/views/file/upload_form.php b/application/views/file/upload_form.php index 8f6807373..e2350c09d 100644 --- a/application/views/file/upload_form.php +++ b/application/views/file/upload_form.php @@ -14,7 +14,7 @@
- +