From 905ff52a362b6afc28a2c3ed1cbc9b90d63253ba Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 10 Nov 2010 18:50:51 +0300 Subject: implement label cache; misc fixes (bump schema) --- modules/pref-labels.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'modules/pref-labels.php') diff --git a/modules/pref-labels.php b/modules/pref-labels.php index 73d6e583f..884a25d1a 100644 --- a/modules/pref-labels.php +++ b/modules/pref-labels.php @@ -21,6 +21,14 @@ fg_color = '$fg', bg_color = '$bg' WHERE id = '$id' AND owner_uid = " . $_SESSION["uid"]); } + + $caption = db_escape_string(label_find_caption($link, $id, $_SESSION["uid"])); + + /* Remove cached data */ + + db_query($link, "UPDATE ttrss_user_entries SET label_cache = '' + WHERE label_cache LIKE '%$caption%' AND owner_uid = " . $_SESSION["uid"]); + } return; @@ -33,6 +41,13 @@ db_query($link, "UPDATE ttrss_labels2 SET fg_color = '', bg_color = '' WHERE id = '$id' AND owner_uid = " . $_SESSION["uid"]); + + $caption = db_escape_string(label_find_caption($link, $id, $_SESSION["uid"])); + + /* Remove cached data */ + + db_query($link, "UPDATE ttrss_user_entries SET label_cache = '' + WHERE label_cache LIKE '%$caption%' AND owner_uid = " . $_SESSION["uid"]); } } -- cgit v1.2.3-54-g00ecf