diff options
author | Andrew Dolgov <[email protected]> | 2018-12-06 08:29:32 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-12-06 08:29:32 +0300 |
commit | fd10614f5df59968234ed25f46a5c109eca953f6 (patch) | |
tree | 2e6c4de7504736bd9dafb6f41c9bde22840fd3db /classes/pref/labels.php | |
parent | 0a41c1a6e1e4d822d5ec970e918f83e7104b60f6 (diff) |
labels: unfortunately we can't rely on caption to selectively clear label_cache (because of json unicode encoding) so clean it completely if label is updated
Diffstat (limited to 'classes/pref/labels.php')
-rw-r--r-- | classes/pref/labels.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/classes/pref/labels.php b/classes/pref/labels.php index 498e593fd..0414a7f8e 100644 --- a/classes/pref/labels.php +++ b/classes/pref/labels.php @@ -144,13 +144,11 @@ class Pref_Labels extends Handler_Protected { $sth->execute([$fg, $bg, $id, $_SESSION['uid']]); } - $caption = Labels::find_caption($id, $_SESSION["uid"]); - /* Remove cached data */ $sth = $this->pdo->prepare("UPDATE ttrss_user_entries SET label_cache = '' - WHERE label_cache LIKE ? AND owner_uid = ?"); - $sth->execute(["%$caption%", $_SESSION['uid']]); + WHERE owner_uid = ?"); + $sth->execute([$_SESSION['uid']]); } } @@ -163,13 +161,11 @@ class Pref_Labels extends Handler_Protected { AND owner_uid = ?"); $sth->execute([$id, $_SESSION['uid']]); - $caption = Labels::find_caption($id, $_SESSION["uid"]); - /* Remove cached data */ $sth = $this->pdo->prepare("UPDATE ttrss_user_entries SET label_cache = '' - WHERE label_cache LIKE ? AND owner_uid = ?"); - $sth->execute(["%$caption%", $_SESSION['uid']]); + WHERE owner_uid = ?"); + $sth->execute([$_SESSION['uid']]); } } |