mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 22:45:56 +00:00
Labels were cached without taking into account related owner
This commit is contained in:
committed by
Andrew Dolgov
parent
a6e043ffff
commit
624d649f86
@@ -3905,9 +3905,9 @@
|
||||
}
|
||||
|
||||
if (count($rv) > 0)
|
||||
label_update_cache($link, $id, $rv);
|
||||
label_update_cache($link, $owner_uid, $id, $rv);
|
||||
else
|
||||
label_update_cache($link, $id, array("no-labels" => 1));
|
||||
label_update_cache($link, $owner_uid, $id, array("no-labels" => 1));
|
||||
|
||||
return $rv;
|
||||
}
|
||||
@@ -3937,7 +3937,7 @@
|
||||
return $rv;
|
||||
}
|
||||
|
||||
function label_update_cache($link, $id, $labels = false, $force = false) {
|
||||
function label_update_cache($link, $owner_uid, $id, $labels = false, $force = false) {
|
||||
|
||||
if ($force)
|
||||
label_clear_cache($link, $id);
|
||||
@@ -3948,7 +3948,7 @@
|
||||
$labels = db_escape_string(json_encode($labels));
|
||||
|
||||
db_query($link, "UPDATE ttrss_user_entries SET
|
||||
label_cache = '$labels' WHERE ref_id = '$id'");
|
||||
label_cache = '$labels' WHERE ref_id = '$id' AND owner_uid = '$owner_uid'");
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user