From 1b8b1505e51f1a19c3fa4ece61ce0bd2e4030b20 Mon Sep 17 00:00:00 2001 From: Daniel Ziegenberg Date: Mon, 20 Jan 2025 16:00:25 +0100 Subject: [PATCH] MDL-73700 backup: remove old PHP version check As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up to PHP 8.1 we can now safely remove this check. Signed-off-by: Daniel Ziegenberg --- backup/cc/restore_cc.php | 11 ----------- lang/en/deprecated.txt | 1 + lang/en/imscc.php | 4 +++- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/backup/cc/restore_cc.php b/backup/cc/restore_cc.php index 94625fb4ee0..845d9e2e791 100644 --- a/backup/cc/restore_cc.php +++ b/backup/cc/restore_cc.php @@ -39,11 +39,6 @@ function cc_convert ($dir) { $detected_requirements = detect_requirements(); - if (!$detected_requirements["php5"]) { - echo $OUTPUT->notification(get_string('cc_import_req_php5', 'imscc')); - return false; - } - if (!$detected_requirements["dom"]) { echo $OUTPUT->notification(get_string('cc_import_req_dom', 'imscc')); return false; @@ -98,12 +93,6 @@ function cc_convert ($dir) { function detect_requirements () { - if (floor(phpversion()) >= 5) { - $detected["php5"] = true; - } else { - $detected["php5"] = false; - } - $detected["xsl"] = extension_loaded('xsl'); $detected['dom'] = extension_loaded('dom'); $detected['libxml'] = extension_loaded('libxml'); diff --git a/lang/en/deprecated.txt b/lang/en/deprecated.txt index c365a69e2c7..278e0593e34 100644 --- a/lang/en/deprecated.txt +++ b/lang/en/deprecated.txt @@ -180,3 +180,4 @@ globalratelimit_desc,aiprovider_openai orgid_desc,aiprovider_openai userratelimit,aiprovider_openai userratelimit_desc,aiprovider_openai +cc_import_req_php5,core_imscc diff --git a/lang/en/imscc.php b/lang/en/imscc.php index 20ef87f6cc2..bfa5fd6465f 100644 --- a/lang/en/imscc.php +++ b/lang/en/imscc.php @@ -26,7 +26,6 @@ $string['cc_import_req_dom'] = 'ERROR: The Common Cartridge import requires DOM extension.'; $string['cc_import_req_libxml'] = 'ERROR: The Common Cartridge import requires LIBXML extension.'; $string['cc_import_req_libxmlminversion'] = 'ERROR: The Common Cartridge import requires LIBXML version 2.6.30 or newer.'; -$string['cc_import_req_php5'] = 'ERROR: The Common Cartridge import requires PHP 5 or higher.'; $string['cc_import_req_xsl'] = 'ERROR: The Common Cartridge import requires XSL.'; $string['cc2moodle_checking_schema'] = 'CC format! Checking schema...'; $string['cc2moodle_invalid_schema'] = 'The schema is not valid.'; @@ -36,3 +35,6 @@ $string['cc2moodle_valid_schema'] = 'Schema valid!'; $string['enable_cc_import'] = 'Enable CC import'; $string['enable_cc_import_description'] = 'This setting enables the import of Common Cartridge (IMS-CC) packages using the standard restore functionality. Note it requires PHP5, DOM, XSL and LIBXML (2.6.30 or newer) extensions to be installed in the server.'; $string['checkingforimscc'] = 'Checking for IMS-CC...'; + +// Deprecated since Moodle 5.0. +$string['cc_import_req_php5'] = 'ERROR: The Common Cartridge import requires PHP 5 or higher.';