From e8ba604abcf1a861d550f78b629f81ef1a76bf1c Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 21 Aug 2016 19:47:16 +0200 Subject: Display deprecation warning for files uploaded via plain text API Signed-off-by: Florian Pritz --- application/controllers/file.php | 7 +++++++ application/views/file_plaintext/show_url.php | 1 + 2 files changed, 8 insertions(+) diff --git a/application/controllers/file.php b/application/controllers/file.php index d432386ab..77e7c0413 100644 --- a/application/controllers/file.php +++ b/application/controllers/file.php @@ -85,6 +85,13 @@ class File extends MY_Controller { $id = $this->uri->segment(1); $lexer = urldecode($this->uri->segment(2)); + if (isset($_GET["cli_deprecated"])) { + $this->data['alerts'][] = [ + "type" => "warning", + "message" => "WARNING: This file has been uploaded with a client that uses an old and deprecated API.
This API will be removed in the near future. Please update your client to one that uses a more recent API." + ]; + } + $is_multipaste = false; if ($this->mmultipaste->id_exists($id)) { $is_multipaste = true; diff --git a/application/views/file_plaintext/show_url.php b/application/views/file_plaintext/show_url.php index 64050ddcd..3288ba08e 100644 --- a/application/views/file_plaintext/show_url.php +++ b/application/views/file_plaintext/show_url.php @@ -1,3 +1,4 @@