From a845a3d5e5538fc63312b7f4e2e1475e568ab30b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 29 Apr 2013 09:20:30 +0400 Subject: [PATCH] otp: display notice if GD is missing --- classes/pref/prefs.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index 8bc367201..47f47ae68 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -368,7 +368,7 @@ class Pref_Prefs extends Handler_Protected { print ""; - } else { + } else if (function_exists("imagecreatefromstring")) { print "

".__("You will need a compatible Authenticator to use this. Changing your password would automatically disable OTP.") . "

"; @@ -427,6 +427,10 @@ class Pref_Prefs extends Handler_Protected { print ""; + } else { + + print_notice(__("PHP GD functions are required for OTP support.")); + } }