diff options
author | Andrew Dolgov <[email protected]> | 2010-11-10 18:50:51 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-11-10 19:01:14 +0300 |
commit | 905ff52a362b6afc28a2c3ed1cbc9b90d63253ba (patch) | |
tree | 2bcf77d8c7d7f4235fef3bd9aa5171c0c5e3d549 /modules/pref-labels.php | |
parent | 23d064cc81c2ece13781662ccf6dd99106587f67 (diff) |
implement label cache; misc fixes (bump schema)
Diffstat (limited to 'modules/pref-labels.php')
-rw-r--r-- | modules/pref-labels.php | 15 |
1 files changed, 15 insertions, 0 deletions
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"]); } } |