mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
1.9 Beta 2 should not be read as 1.9.2 in environment page
This commit is contained in:
parent
b2dd3a8859
commit
4fa6cb4733
@ -282,6 +282,14 @@ function print_moodle_environment($result, $environment_results) {
|
||||
* @return string the normalized version
|
||||
*/
|
||||
function normalize_version($version) {
|
||||
|
||||
/// 1.9 Beta 2 should be read 1.9 on enviromental checks, not 1.9.2
|
||||
/// we can discard everything after the first space
|
||||
$version = trim($version);
|
||||
$versionarr = explode(" ",$version);
|
||||
if (!empty($versionarr)) {
|
||||
$version = $versionarr[0];
|
||||
}
|
||||
/// Replace everything but numbers and dots by dots
|
||||
$version = preg_replace('/[^\.\d]/', '.', $version);
|
||||
/// Combine multiple dots in one
|
||||
|
Loading…
x
Reference in New Issue
Block a user