]> git.wh0rd.org Git - tt-rss.git/commitdiff
otp: display notice if GD is missing
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 29 Apr 2013 05:20:30 +0000 (09:20 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 29 Apr 2013 05:20:30 +0000 (09:20 +0400)
classes/pref/prefs.php

index 8bc3672013bdeaa80b53ab16943521fd13c3e877..47f47ae680d38924415da9e67174f31f5bd3176f 100644 (file)
@@ -368,7 +368,7 @@ class Pref_Prefs extends Handler_Protected {
 
                                print "</form>";
 
-                               } else {
+                               } else if (function_exists("imagecreatefromstring")) {
 
                                        print "<p>".__("You will need a compatible Authenticator to use this. Changing your password would automatically disable OTP.") . "</p>";
 
@@ -427,6 +427,10 @@ class Pref_Prefs extends Handler_Protected {
 
                                        print "</form>";
 
+                               } else {
+
+                                       print_notice(__("PHP GD functions are required for OTP support."));
+
                                }
 
                        }