]> git.mjollnir.org Git - moodle.git/commitdiff
Some fixes for check_gd_version -- please test this for me on every server you have!
authormoodler <moodler>
Mon, 19 May 2003 03:27:13 +0000 (03:27 +0000)
committermoodler <moodler>
Mon, 19 May 2003 03:27:13 +0000 (03:27 +0000)
lib/moodlelib.php

index d31a8357f64058bf6cd00d9e190ec63a335c93d0..62a1309d43f2b05ef5122b93d919b7db978fc7bf 100644 (file)
@@ -1256,10 +1256,12 @@ function check_gd_version() {
 
     if (function_exists('gd_info')){
         $gd_info = gd_info();
-        /// THIS IS UGLY AND NEEDS TO BE IMPROVED
-        if($gd_info['GD Version'] == 'bundled (2.0 compatible)'){
+        if (substr_count($gd_info['GD Version'], "2.")) {
             $gdversion = 2;
+        } else if (substr_count($gd_info['GD Version'], "1.")) {
+            $gdversion = 1;
         }
+
     } else {
         ob_start();
         phpinfo(8);