Skip to content

Commit

Permalink
added in a commented out reimplementation of check_php_version, that …
Browse files Browse the repository at this point in the history
…will most

likely never be used.
  • Loading branch information
gregb_cc committed Dec 17, 2002
1 parent fd66477 commit 709c0cb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/moodlelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2134,7 +2134,14 @@ function check_php_version($version="4.1.0") {
$minversion = intval(str_replace(".", "", $version));
$curversion = intval(str_replace(".", "", phpversion()));
return ($curversion >= $minversion);
// return version_compare(phpversion(), $version, ">=");
# below is a slightly different implementation, that is faster, but cannot check
# versions isn't flexible in testing versions lower than 4.1.0
// if (function_exists(version_compare)){
// return version_compare(PHP_VERSION, $version, ">=");
// } else {
// # version_compare does not exist pre 4.1.0, so we know that the users version is too old.
// return false;
// }
}

function check_browser_version($brand="MSIE", $version=5.5) {
Expand Down

0 comments on commit 709c0cb

Please sign in to comment.