mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-16 06:05:58 +00:00
import_export: set tsvector_combined using DEFAULT_SEARCH_LANGUAGE on import
This commit is contained in:
@@ -400,6 +400,21 @@ class Import_Export extends Plugin implements IHandler {
|
|||||||
|
|
||||||
if ($res) {
|
if ($res) {
|
||||||
|
|
||||||
|
if (DB_TYPE == "pgsql") {
|
||||||
|
$ts_lang = get_pref('DEFAULT_SEARCH_LANGUAGE', $owner_uid);
|
||||||
|
// TODO: maybe use per-feed setting if available?
|
||||||
|
|
||||||
|
$sth = $this->pdo->prepare("UPDATE ttrss_entries
|
||||||
|
SET tsvector_combined = to_tsvector(:ts_lang, :ts_content)
|
||||||
|
WHERE id = :id");
|
||||||
|
|
||||||
|
$sth->execute([
|
||||||
|
"id" => $ref_id,
|
||||||
|
"ts_lang" => $ts_lang,
|
||||||
|
"ts_content" => mb_substr(strip_tags($article['title'] . " " . $article['content']), 0, 900000)
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
$label_cache = json_decode($article['label_cache'], true);
|
$label_cache = json_decode($article['label_cache'], true);
|
||||||
|
|
||||||
if (is_array($label_cache) && $label_cache["no-labels"] != 1) {
|
if (is_array($label_cache) && $label_cache["no-labels"] != 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user