From 025d3b060b987dfc3ddef6728e6a8493b1be6edf Mon Sep 17 00:00:00 2001 From: meirzamoodle Date: Fri, 9 Jan 2026 10:18:08 +0700 Subject: [PATCH] MDL-87426 core_files: Remove the deprecated function --- .upgradenotes/MDL-87426-2025123009384059.yml | 8 ++++++ public/lib/filestorage/file_storage.php | 26 -------------------- public/lib/filestorage/file_system.php | 1 - 3 files changed, 8 insertions(+), 27 deletions(-) create mode 100644 .upgradenotes/MDL-87426-2025123009384059.yml diff --git a/.upgradenotes/MDL-87426-2025123009384059.yml b/.upgradenotes/MDL-87426-2025123009384059.yml new file mode 100644 index 00000000000..4d551dd3eb8 --- /dev/null +++ b/.upgradenotes/MDL-87426-2025123009384059.yml @@ -0,0 +1,8 @@ +issueNumber: MDL-87426 +notes: + core_files: + - message: >- + The following methods have been removed from `public/lib/filestorage/file_storage.php`: + - `\file_storage::content_exists()` + - `\file_storage::try_content_recovery()` + type: removed diff --git a/public/lib/filestorage/file_storage.php b/public/lib/filestorage/file_storage.php index 76d9a5bf79d..01e0b03a889 100644 --- a/public/lib/filestorage/file_storage.php +++ b/public/lib/filestorage/file_storage.php @@ -1913,32 +1913,6 @@ class file_storage { return $this->filesystem->supports_xsendfile(); } - /** - * Content exists - * - * @param string $contenthash - * @return bool - * @deprecated since 3.3 - */ - public function content_exists($contenthash) { - debugging('The content_exists function has been deprecated and should no longer be used.', DEBUG_DEVELOPER); - - return false; - } - - /** - * Tries to recover missing content of file from trash. - * - * @param stored_file $file stored_file instance - * @return bool success - * @deprecated since 3.3 - */ - public function try_content_recovery($file) { - debugging('The try_content_recovery function has been deprecated and should no longer be used.', DEBUG_DEVELOPER); - - return false; - } - /** * When user referring to a moodle file, we build the reference field * diff --git a/public/lib/filestorage/file_system.php b/public/lib/filestorage/file_system.php index b9e8cee61a9..b9dd7322c30 100644 --- a/public/lib/filestorage/file_system.php +++ b/public/lib/filestorage/file_system.php @@ -168,7 +168,6 @@ abstract class file_system { return true; } - // This is called by file_storage::content_exists(), and in turn by the repository system. $path = $this->get_local_path_from_hash($contenthash, $fetchifnotfound); // Note - it is not possible to perform a content recovery safely from a hash alone.