]> git.mjollnir.org Git - moodle.git/commitdiff
1.9 Beta 2 should not be read as 1.9.2 in environment page
authortoyomoyo <toyomoyo>
Thu, 8 Nov 2007 05:13:18 +0000 (05:13 +0000)
committertoyomoyo <toyomoyo>
Thu, 8 Nov 2007 05:13:18 +0000 (05:13 +0000)
lib/environmentlib.php

index 0cc024557304ecd92926f6b479478cefeba176d2..614fe1342cc36927a99e873abdc93c1c660a16c2 100644 (file)
@@ -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