X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=include%2Frssfuncs.php;h=1a3c2bc4313dcfcc670d68bd1e51826401cb9624;hb=da7e3e91bf6051d342819d596b76dd4e05740cd6;hp=8f71f950afbfa79d128f708fe512ca1e81ee0996;hpb=73f9378d26e4eb26157f806809a5470cf3b41347;p=tt-rss.git diff --git a/include/rssfuncs.php b/include/rssfuncs.php index 8f71f950..1a3c2bc4 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -621,7 +621,8 @@ $entry_language = $lang->detect($entry_title . " " . $entry_content, 1); if (count($entry_language) > 0) { - @$entry_language = array_keys($entry_language)[0]; + $possible = array_keys($entry_language); + $entry_language = $possible[0]; _debug("detected language: $entry_language", $debug_enabled); } else { @@ -682,7 +683,7 @@ "link" => $entry_link, "tags" => $entry_tags, "author" => $entry_author, - "language" => $entry_language, + "language" => $entry_language, // read only "feed" => array("id" => $feed, "fetch_url" => $fetch_url, "site_url" => $site_url) @@ -693,7 +694,7 @@ _debug("article hash: $entry_current_hash [stored=$entry_stored_hash]", $debug_enabled); - if ($entry_current_hash == $entry_stored_hash) { + if ($entry_current_hash == $entry_stored_hash && !isset($_REQUEST["force_rehash"])) { _debug("stored article seems up to date [IID: $base_entry_id], updating timestamp only", $debug_enabled); // we keep encountering the entry in feeds, so we need to @@ -706,7 +707,11 @@ db_query("UPDATE ttrss_entries SET date_updated = NOW() WHERE id = '$base_entry_id'"); - continue; + // if we allow duplicate posts, we have to continue to + // create the user entries for this feed + if (!get_pref("ALLOW_DUPLICATE_POSTS", $owner_uid, false)) { + continue; + } } _debug("hash differs, applying plugin filters:", $debug_enabled);