mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-23 16:11:28 +00:00
fix tag caching issues
This commit is contained in:
@@ -424,7 +424,6 @@
|
||||
|
||||
$tags_str = db_escape_string($_REQUEST["tags_str"]);
|
||||
$tags = array_unique(trim_array(split(",", $tags_str)));
|
||||
$tags_str = db_escape_string(join(",", $tags));
|
||||
|
||||
db_query($link, "BEGIN");
|
||||
|
||||
@@ -433,6 +432,8 @@
|
||||
|
||||
if (db_num_rows($result) == 1) {
|
||||
|
||||
$tags_to_cache = array();
|
||||
|
||||
$int_id = db_fetch_result($result, 0, "int_id");
|
||||
|
||||
db_query($link, "DELETE FROM ttrss_tags WHERE
|
||||
@@ -455,12 +456,18 @@
|
||||
db_query($link, "INSERT INTO ttrss_tags
|
||||
(post_int_id, owner_uid, tag_name) VALUES ('$int_id', '".$_SESSION["uid"]."', '$tag')");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
db_query($link, "UPDATE ttrss_user_entries
|
||||
SET tag_cache = '$tags_str' WHERE ref_id = '$id'
|
||||
AND owner_uid = " . $_SESSION["uid"]);
|
||||
array_push($tags_to_cache, $tag);
|
||||
}
|
||||
|
||||
/* update tag cache */
|
||||
|
||||
$tags_str = join(",", $tags_to_cache);
|
||||
|
||||
db_query($link, "UPDATE ttrss_user_entries
|
||||
SET tag_cache = '$tags_str' WHERE ref_id = '$id'
|
||||
AND owner_uid = " . $_SESSION["uid"]);
|
||||
}
|
||||
|
||||
db_query($link, "COMMIT");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user