mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-08 07:05:44 -04:00
No old ID (#2276)
* No old ID https://github.com/FreshRSS/FreshRSS/issues/2273 * PostgreSQL insert or ignore
This commit is contained in:
committed by
GitHub
parent
cb00eafba0
commit
834ffacce2
@@ -377,17 +377,13 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
|
||||
$read_upon_reception = $feed->attributes('read_upon_reception') !== null ? (
|
||||
$feed->attributes('read_upon_reception')
|
||||
) : FreshRSS_Context::$user_conf->mark_when['reception'];
|
||||
if ($isNewFeed) {
|
||||
$id = min(time(), $entry_date) . uSecString();
|
||||
$entry->_isRead($read_upon_reception);
|
||||
} elseif ($entry_date < $date_min) {
|
||||
$id = min(time(), $entry_date) . uSecString();
|
||||
$id = uTimeString();
|
||||
$entry->_id($id);
|
||||
if ($entry_date < $date_min) {
|
||||
$entry->_isRead(true); //Old article that was not in database. Probably an error, so mark as read
|
||||
} else {
|
||||
$id = uTimeString();
|
||||
$entry->_isRead($read_upon_reception);
|
||||
}
|
||||
$entry->_id($id);
|
||||
|
||||
$entry = Minz_ExtensionManager::callHook('entry_before_insert', $entry);
|
||||
if ($entry === null) {
|
||||
|
||||
Reference in New Issue
Block a user