mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-02-10 16:01:33 +00:00
obsolete cookie storage for collapsed status of feedlist and special categories (bump schema)
This commit is contained in:
+24
-25
@@ -27,35 +27,34 @@
|
||||
|
||||
$cat_id = db_escape_string($_GET["id"]);
|
||||
|
||||
switch ($cat_id) {
|
||||
case 0:
|
||||
if ($_COOKIE["ttrss_vf_uclps"] != 1) {
|
||||
setcookie("ttrss_vf_uclps", 1);
|
||||
} else {
|
||||
setcookie("ttrss_vf_uclps", 0);
|
||||
}
|
||||
break;
|
||||
case -1:
|
||||
if ($_COOKIE["ttrss_vf_vclps"] != 1) {
|
||||
setcookie("ttrss_vf_vclps", 1);
|
||||
} else {
|
||||
setcookie("ttrss_vf_vclps", 0);
|
||||
}
|
||||
break;
|
||||
case -2:
|
||||
if ($_COOKIE["ttrss_vf_lclps"] != 1) {
|
||||
setcookie("ttrss_vf_lclps", 1);
|
||||
} else {
|
||||
setcookie("ttrss_vf_lclps", 0);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if ($cat_id > 0) {
|
||||
db_query($link, "UPDATE ttrss_feed_categories SET
|
||||
collapsed = NOT collapsed WHERE id = '$cat_id' AND owner_uid = " .
|
||||
$_SESSION["uid"]);
|
||||
break;
|
||||
} else {
|
||||
$pref_name = '';
|
||||
|
||||
switch ($cat_id) {
|
||||
case -1:
|
||||
$pref_name = '_COLLAPSED_SPECIAL';
|
||||
break;
|
||||
case -2:
|
||||
$pref_name = '_COLLAPSED_LABELS';
|
||||
break;
|
||||
case 0:
|
||||
$pref_name = '_COLLAPSED_UNCAT';
|
||||
break;
|
||||
}
|
||||
|
||||
if ($pref_name) {
|
||||
if (get_pref($link, $pref_name)) {
|
||||
set_pref($link, $pref_name, 'false');
|
||||
} else {
|
||||
set_pref($link, $pref_name, 'true');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
header("Location: index.php");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user