diff options
author | fox <[email protected]> | 2019-04-14 13:12:30 +0000 |
---|---|---|
committer | Gogs <[email protected]> | 2019-04-14 13:12:30 +0000 |
commit | a2be311f524f6456b9b22fbf2c0cd5a847240a10 (patch) | |
tree | 0fcfbb7cd9a2794450a46eaed920e1d40c5a093c /classes/article.php | |
parent | 7e55340295d7c3f7d1fded0c8d07700b908b57f2 (diff) | |
parent | e397caa82adb689a279e605bf17b852552105e11 (diff) |
Merge branch 'master' of zeed/tt-rss into master
Diffstat (limited to 'classes/article.php')
-rwxr-xr-x | classes/article.php | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/classes/article.php b/classes/article.php index ff83143d6..d6387107a 100755 --- a/classes/article.php +++ b/classes/article.php @@ -151,6 +151,16 @@ class Article extends Handler_Protected { content = ?, content_hash = ? WHERE id = ?"); $sth->execute([$content, $content_hash, $ref_id]); + if (DB_TYPE == "pgsql"){ + $sth = $pdo->prepare("UPDATE ttrss_entries + SET tsvector_combined = to_tsvector( :ts_content) + WHERE id = :id"); + $params = [ + ":ts_content" => mb_substr(strip_tags($content ), 0, 900000), + ":id" => $ref_id]; + $sth->execute($params); + } + $sth = $pdo->prepare("UPDATE ttrss_user_entries SET published = true, last_published = NOW() WHERE int_id = ? AND owner_uid = ?"); @@ -186,7 +196,15 @@ class Article extends Handler_Protected { if ($row = $sth->fetch()) { $ref_id = $row["id"]; - + if (DB_TYPE == "pgsql"){ + $sth = $pdo->prepare("UPDATE ttrss_entries + SET tsvector_combined = to_tsvector( :ts_content) + WHERE id = :id"); + $params = [ + ":ts_content" => mb_substr(strip_tags($content ), 0, 900000), + ":id" => $ref_id]; + $sth->execute($params); + } $sth = $pdo->prepare("INSERT INTO ttrss_user_entries (ref_id, uuid, feed_id, orig_feed_id, owner_uid, published, tag_cache, label_cache, last_read, note, unread, last_published) |