diff options
author | fox <[email protected]> | 2018-08-12 15:45:11 +0000 |
---|---|---|
committer | Gogs <[email protected]> | 2018-08-12 15:45:11 +0000 |
commit | 7418323f530f8364cb5f67e0528f75bad3491743 (patch) | |
tree | a5ca48e001cd9d64cea99182aa11ed53d7c6c68f /classes/rssutils.php | |
parent | 83da40251fbf3409a3b89a107fdf63eed805c28b (diff) | |
parent | a377d5c981471f86c0d0c121be799aa0868e220e (diff) |
Merge branch 'pullreq-store-language' of tkappe/tt-rss into master
Diffstat (limited to 'classes/rssutils.php')
-rwxr-xr-x | classes/rssutils.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/classes/rssutils.php b/classes/rssutils.php index b69bb25a0..af5fd057c 100755 --- a/classes/rssutils.php +++ b/classes/rssutils.php @@ -637,8 +637,11 @@ class RSSUtils { $entry_link = rewrite_relative_url($site_url, $item->get_link()); + $entry_language = mb_substr(trim($item->get_language()), 0, 2); + _debug("title $entry_title", $debug_enabled); _debug("link $entry_link", $debug_enabled); + _debug("language $entry_language", $debug_enabled); if (!$entry_title) $entry_title = date("Y-m-d H:i:s", $entry_timestamp);; @@ -694,7 +697,6 @@ class RSSUtils { $base_entry_id = $row["id"]; $entry_stored_hash = $row["content_hash"]; $article_labels = Article::get_article_labels($base_entry_id, $owner_uid); - $entry_language = $row["lang"]; $existing_tags = Article::get_article_tags($base_entry_id, $owner_uid); $entry_tags = array_unique(array_merge($entry_tags, $existing_tags)); @@ -702,7 +704,6 @@ class RSSUtils { $base_entry_id = false; $entry_stored_hash = ""; $article_labels = array(); - $entry_language = ""; } $article = array("owner_uid" => $owner_uid, // read only |