summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-09-14 02:52:49 +0400
committerAndrew Dolgov <[email protected]>2012-09-14 02:52:49 +0400
commit1835f145a8f4d450e33b15faf7d50437731a8793 (patch)
treebf02779a1f7c13b029807e87dffbe35fa72f5743
parent7ac3f735e1e5b7474e19bd55f1d25abe052b8aaa (diff)
only enable OTPHP on php version 5.3+
-rw-r--r--classes/auth/internal.php2
-rw-r--r--classes/pref/prefs.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/classes/auth/internal.php b/classes/auth/internal.php
index 37014ce47..92c19eb64 100644
--- a/classes/auth/internal.php
+++ b/classes/auth/internal.php
@@ -9,7 +9,7 @@ class Auth_Internal extends Auth_Base {
$otp = db_escape_string($_REQUEST["otp"]);
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
login = '$login'");
diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php
index e9f420774..f4a663dbd 100644
--- a/classes/pref/prefs.php
+++ b/classes/pref/prefs.php
@@ -258,7 +258,7 @@ class Pref_Prefs extends Handler_Protected {
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>";