mirror of
https://tt-rss.org/git/tt-rss.git
synced 2024-06-29 12:20:51 +02:00
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
This commit is contained in:
parent
0a41c1a6e1
commit
fd10614f5d
|
@ -163,8 +163,8 @@ class Labels
|
||||||
/* Remove cached data */
|
/* Remove cached data */
|
||||||
|
|
||||||
$sth = $pdo->prepare("UPDATE ttrss_user_entries SET label_cache = ''
|
$sth = $pdo->prepare("UPDATE ttrss_user_entries SET label_cache = ''
|
||||||
WHERE label_cache LIKE ? AND owner_uid = ?");
|
WHERE owner_uid = ?");
|
||||||
$sth->execute(["%$caption%", $owner_uid]);
|
$sth->execute([$owner_uid]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -144,13 +144,11 @@ class Pref_Labels extends Handler_Protected {
|
||||||
$sth->execute([$fg, $bg, $id, $_SESSION['uid']]);
|
$sth->execute([$fg, $bg, $id, $_SESSION['uid']]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$caption = Labels::find_caption($id, $_SESSION["uid"]);
|
|
||||||
|
|
||||||
/* Remove cached data */
|
/* Remove cached data */
|
||||||
|
|
||||||
$sth = $this->pdo->prepare("UPDATE ttrss_user_entries SET label_cache = ''
|
$sth = $this->pdo->prepare("UPDATE ttrss_user_entries SET label_cache = ''
|
||||||
WHERE label_cache LIKE ? AND owner_uid = ?");
|
WHERE owner_uid = ?");
|
||||||
$sth->execute(["%$caption%", $_SESSION['uid']]);
|
$sth->execute([$_SESSION['uid']]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,13 +161,11 @@ class Pref_Labels extends Handler_Protected {
|
||||||
AND owner_uid = ?");
|
AND owner_uid = ?");
|
||||||
$sth->execute([$id, $_SESSION['uid']]);
|
$sth->execute([$id, $_SESSION['uid']]);
|
||||||
|
|
||||||
$caption = Labels::find_caption($id, $_SESSION["uid"]);
|
|
||||||
|
|
||||||
/* Remove cached data */
|
/* Remove cached data */
|
||||||
|
|
||||||
$sth = $this->pdo->prepare("UPDATE ttrss_user_entries SET label_cache = ''
|
$sth = $this->pdo->prepare("UPDATE ttrss_user_entries SET label_cache = ''
|
||||||
WHERE label_cache LIKE ? AND owner_uid = ?");
|
WHERE owner_uid = ?");
|
||||||
$sth->execute(["%$caption%", $_SESSION['uid']]);
|
$sth->execute([$_SESSION['uid']]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user