diff options
| author | 2013-11-28 10:05:58 +0100 | |
|---|---|---|
| committer | 2013-11-28 10:05:58 +0100 | |
| commit | dcd6f3ef16f7e698ef1aa8c5bdd5a1e2c85021c9 (patch) | |
| tree | 7d9348a772672231bcc44180237fb2203803b25e /app | |
| parent | ee2c1a8c7888ef16d76a0c03ff2040aaa8a11a94 (diff) | |
e.id utilise la date déclarée pour les nouveaux flux
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/202
Diffstat (limited to 'app')
| -rwxr-xr-x | app/controllers/feedController.php | 3 | ||||
| -rwxr-xr-x | app/models/Entry.php | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/feedController.php b/app/controllers/feedController.php index cd252b086..2bbd5ab49 100755 --- a/app/controllers/feedController.php +++ b/app/controllers/feedController.php @@ -97,6 +97,7 @@ class feedController extends ActionController { if ($entry->date (true) >= $date_min || $feed->keepHistory ()) { $values = $entry->toArray (); + $values['id'] = min(time(), $entry->date (true)) . '.' . rand(0, 999999); $entryDAO->addEntry ($values); } } @@ -196,6 +197,8 @@ class feedController extends ActionController { ($entry->date (true) >= $date_min || $feed->keepHistory ())) { $values = $entry->toArray (); + //Use declared date at first import, otherwise use discovery date + $values['id'] = empty($existingGuids) ? min(time(), $entry->date (true)) . '.' . rand(0, 999999) : microtime(true); $entryDAO->addEntry ($values); } } diff --git a/app/models/Entry.php b/app/models/Entry.php index 80e8d7b6e..f8ec1287c 100755 --- a/app/models/Entry.php +++ b/app/models/Entry.php @@ -203,7 +203,7 @@ class EntryDAO extends Model_pdo { $stm = $this->bd->prepare ($sql); $values = array ( - microtime(true), + $valuesTmp['id'], substr($valuesTmp['guid'], 0, 760), substr($valuesTmp['title'], 0, 255), substr($valuesTmp['author'], 0, 255), |
