only enable OTPHP on php version 5.3+

master
Andrew Dolgov 12 years ago
parent 7ac3f735e1
commit 1835f145a8

@ -9,7 +9,7 @@ class Auth_Internal extends Auth_Base {
$otp = db_escape_string($_REQUEST["otp"]); $otp = db_escape_string($_REQUEST["otp"]);
if (get_schema_version($this->link) > 96) { if (get_schema_version($this->link) > 96) {
if (!defined('AUTH_DISABLE_OTP') || !AUTH_DISABLE_OTP) { if (version_compare(PHP_VERSION, '5.3.0') >= 0 && !defined('AUTH_DISABLE_OTP') || !AUTH_DISABLE_OTP) {
$result = db_query($this->link, "SELECT otp_enabled,salt FROM ttrss_users WHERE $result = db_query($this->link, "SELECT otp_enabled,salt FROM ttrss_users WHERE
login = '$login'"); login = '$login'");

@ -258,7 +258,7 @@ class Pref_Prefs extends Handler_Protected {
print "</form>"; print "</form>";
if ($_SESSION["auth_module"] == "internal") { if (version_compare(PHP_VERSION, '5.3.0') >= 0 && $_SESSION["auth_module"] == "internal") {
print "<h2>" . __("One time passwords / Authenticator") . "</h2>"; print "<h2>" . __("One time passwords / Authenticator") . "</h2>";

Loading…
Cancel
Save