From d4c64ecc77a46c174d64ba6173a92834bbc1f74f Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 29 Mar 2012 14:44:52 +0400 Subject: [PATCH] pref_prefs: only disable password changing block in single user mode (closes #444) --- classes/pref_prefs.php | 79 +++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 39 deletions(-) diff --git a/classes/pref_prefs.php b/classes/pref_prefs.php index 2cbdddab..beaca2a9 100644 --- a/classes/pref_prefs.php +++ b/classes/pref_prefs.php @@ -160,60 +160,60 @@ class Pref_Prefs extends Protected_Handler { "SSL_CERT_SERIAL", "DIGEST_PREFERRED_TIME"); - if (!SINGLE_USER_MODE) { + $_SESSION["prefs_op_result"] = ""; - $_SESSION["prefs_op_result"] = ""; + print "
"; + print "
"; - print "
"; - print "
"; + print "
"; - print ""; + print ""; - } - "; + print ""; - print "
"; + $result = db_query($this->link, "SELECT email,full_name, + access_level FROM ttrss_users + WHERE id = ".$_SESSION["uid"]); - $result = db_query($this->link, "SELECT email,full_name, - access_level FROM ttrss_users - WHERE id = ".$_SESSION["uid"]); + $email = htmlspecialchars(db_fetch_result($result, 0, "email")); + $full_name = htmlspecialchars(db_fetch_result($result, 0, "full_name")); - $email = htmlspecialchars(db_fetch_result($result, 0, "email")); - $full_name = htmlspecialchars(db_fetch_result($result, 0, "full_name")); + print ""; + print ""; - print ""; - print ""; + print ""; + print ""; - print ""; - print ""; + if (!SINGLE_USER_MODE) { + $access_level = db_fetch_result($result, 0, "access_level"); + print ""; + print ""; + } - if (!SINGLE_USER_MODE) { - $access_level = db_fetch_result($result, 0, "access_level"); - print ""; - print ""; - } + print "
".__('Full name')."
".__('Full name')."
".__('E-mail')."
".__('E-mail')."
".__('Access level')."" . $access_level_names[$access_level] . "
".__('Access level')."" . $access_level_names[$access_level] . "
"; - print ""; + print ""; + print ""; - print ""; - print ""; + print "

"; - print "

"; + print "

"; - print ""; + if (!SINGLE_USER_MODE) { $result = db_query($this->link, "SELECT id FROM ttrss_users WHERE id = ".$_SESSION["uid"]." AND pwd_hash @@ -270,9 +270,10 @@ class Pref_Prefs extends Protected_Handler { print ""; - print "
"; #pane } + print "
"; #pane + print "
"; print "
"; -- 2.39.5