$pdo = Db::pdo();
- $sth = $pdo->prepare("SELECT id, fg_color, bg_color, caption FROM ttrss_labels2
+ $sth = $pdo->prepare("SELECT id, fg_color, bg_color, caption FROM ttrss_labels2
WHERE owner_uid = ? ORDER BY caption");
$sth->execute([$owner_uid]);
if (!$labels)
$labels = Article::get_article_labels($id);
- $labels = db_escape_string(json_encode($labels));
+ $labels = json_encode($labels);
$sth = $pdo->prepare("UPDATE ttrss_user_entries SET
label_cache = ? WHERE ref_id = ? AND owner_uid = ?");
$sth->execute([$caption, $owner_uid]);
if (!$sth->fetch()) {
- $sth = $pdo->prepare("INSERT INTO ttrss_labels2
+ $sth = $pdo->prepare("INSERT INTO ttrss_labels2
(caption,owner_uid,fg_color,bg_color) VALUES (?, ?, ?, ?)");
$sth->execute([$caption, $owner_uid, $fg_color, $bg_color]);