From 7f6eb66405b4c4429fb7c22082a958646c6ef05c Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 27 Nov 2013 23:49:51 +0100 Subject: [PATCH] Suite de e.id en bigint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contribue à https://github.com/marienfressinaud/FreshRSS/issues/202 --- app/models/Entry.php | 8 ++++++++ app/models/Feed.php | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/models/Entry.php b/app/models/Entry.php index c5ff6ab60..636e67e75 100755 --- a/app/models/Entry.php +++ b/app/models/Entry.php @@ -57,6 +57,14 @@ class Entry extends Model { return timestamptodate ($this->date); } } + public function dateAdded ($raw = false) { + $date = intval(substr($this->id, 0, -6)); + if ($raw) { + return $date; + } else { + return timestamptodate ($date); + } + } public function isRead () { return $this->is_read; } diff --git a/app/models/Feed.php b/app/models/Feed.php index d1d85d838..8927551d6 100644 --- a/app/models/Feed.php +++ b/app/models/Feed.php @@ -310,7 +310,7 @@ class Feed extends Model { // permet de récupérer le contenu des flux tronqués $entry->loadCompleteContent($this->pathEntries()); - $entries[$entry->id ()] = $entry; + $entries[] = $entry; } $this->entries = $entries;