From 39f2bbf3fb6b560fa237ef9ab16265967e8cfd33 Mon Sep 17 00:00:00 2001 From: Rossiani Wijaya Date: Wed, 22 Dec 2010 16:45:17 +0800 Subject: [PATCH] MDL-25186: add environmental check to recommend PHP 5.3.3 --- admin/environment.xml | 5 +++++ lang/en/admin.php | 1 + lib/customcheckslib.php | 9 +++++++++ 3 files changed, 15 insertions(+) mode change 100755 => 100644 lang/en/admin.php diff --git a/admin/environment.xml b/admin/environment.xml index b70ced30f46..614fe68f3b6 100644 --- a/admin/environment.xml +++ b/admin/environment.xml @@ -321,6 +321,11 @@ + + + + + diff --git a/lang/en/admin.php b/lang/en/admin.php old mode 100755 new mode 100644 index 1bad6b9c699..b1d59ecc39d --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -782,6 +782,7 @@ $string['perfdebug'] = 'Performance info'; $string['performance'] = 'Performance'; $string['pgcluster'] = 'PostgreSQL Cluster'; $string['pgclusterdescription'] = 'PostgreSQL version/cluster parameter for command line operations. If you only have one postgresql on your system or you are not sure what this is, leave this blank.'; +$string['php533warning'] = 'PHP 5.3.3 and upwards is recommended'; $string['phpfloatproblem'] = 'Detected unexpected problem in handling of PHP float numbers - {$a}'; $string['php50restricted'] = 'PHP 5.0.x has a number of known problems, please upgrade to 5.1.x or downgrade to 4.3.x or 4.4.x'; $string['pleaserefreshregistration'] = 'Your site has been registered with moodle.org, please consider updating the registration if significant changes happened since your last update, on {$a}'; diff --git a/lib/customcheckslib.php b/lib/customcheckslib.php index 35f4698f2d4..7c63c502f79 100644 --- a/lib/customcheckslib.php +++ b/lib/customcheckslib.php @@ -54,3 +54,12 @@ function php_check_register_globals($result) { return $result; } + +function php_check_php533($result) { + if (version_compare(phpversion(), '5.3.3') < 0) { + $result->status = false; + } else { + $result = null; + } + return $result; +} -- 2.43.0