|
|
@ -21,11 +21,12 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ($profile) {
|
|
|
|
if ($profile) {
|
|
|
|
$profile_qpart = "profile = '$profile'";
|
|
|
|
$profile_qpart = "profile = '$profile' AND";
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$profile_qpart = "profile IS NULL";
|
|
|
|
$profile_qpart = "profile IS NULL AND";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (get_schema_version($link) < 63) $profile_qpart = "";
|
|
|
|
|
|
|
|
|
|
|
|
if ($prefs_cache && !defined('DISABLE_SESSIONS') && !SINGLE_USER_MODE) {
|
|
|
|
if ($prefs_cache && !defined('DISABLE_SESSIONS') && !SINGLE_USER_MODE) {
|
|
|
|
if ($_SESSION["prefs_cache"] && $_SESSION["prefs_cache"][$pref_name]) {
|
|
|
|
if ($_SESSION["prefs_cache"] && $_SESSION["prefs_cache"][$pref_name]) {
|
|
|
@ -39,7 +40,7 @@
|
|
|
|
FROM
|
|
|
|
FROM
|
|
|
|
ttrss_user_prefs,ttrss_prefs,ttrss_prefs_types
|
|
|
|
ttrss_user_prefs,ttrss_prefs,ttrss_prefs_types
|
|
|
|
WHERE
|
|
|
|
WHERE
|
|
|
|
$profile_qpart AND
|
|
|
|
$profile_qpart
|
|
|
|
ttrss_user_prefs.pref_name = '$pref_name' AND
|
|
|
|
ttrss_user_prefs.pref_name = '$pref_name' AND
|
|
|
|
ttrss_prefs_types.id = type_id AND
|
|
|
|
ttrss_prefs_types.id = type_id AND
|
|
|
|
owner_uid = '$user_id' AND
|
|
|
|
owner_uid = '$user_id' AND
|
|
|
@ -90,11 +91,13 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ($profile) {
|
|
|
|
if ($profile) {
|
|
|
|
$profile_qpart = "profile = '$profile'";
|
|
|
|
$profile_qpart = "AND profile = '$profile'";
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$profile_qpart = "profile IS NULL";
|
|
|
|
$profile_qpart = "AND profile IS NULL AND";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (get_schema_version($link) < 63) $profile_qpart = "";
|
|
|
|
|
|
|
|
|
|
|
|
$result = db_query($link, "SELECT type_name
|
|
|
|
$result = db_query($link, "SELECT type_name
|
|
|
|
FROM ttrss_prefs,ttrss_prefs_types
|
|
|
|
FROM ttrss_prefs,ttrss_prefs_types
|
|
|
|
WHERE pref_name = '$key' AND type_id = ttrss_prefs_types.id");
|
|
|
|
WHERE pref_name = '$key' AND type_id = ttrss_prefs_types.id");
|
|
|
@ -119,7 +122,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
db_query($link, "UPDATE ttrss_user_prefs SET
|
|
|
|
db_query($link, "UPDATE ttrss_user_prefs SET
|
|
|
|
value = '$value' WHERE pref_name = '$key'
|
|
|
|
value = '$value' WHERE pref_name = '$key'
|
|
|
|
AND $profile_qpart
|
|
|
|
$profile_qpart
|
|
|
|
AND owner_uid = " . $_SESSION["uid"]);
|
|
|
|
AND owner_uid = " . $_SESSION["uid"]);
|
|
|
|
|
|
|
|
|
|
|
|
$_SESSION["prefs_cache"] = array();
|
|
|
|
$_SESSION["prefs_cache"] = array();
|
|
|
|