Skip to content
Permalink
Browse files

1.9 Beta 2 should not be read as 1.9.2 in environment page

  • Loading branch information...
toyomoyo
toyomoyo committed Nov 8, 2007
1 parent f75cf3a commit 85c97584597140a6f5ae7079f7ab0d550b6db2a0
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/environmentlib.php
@@ -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

0 comments on commit 85c9758

Please sign in to comment.
You can’t perform that action at this time.