Просмотр исходного кода

Suite de e.id en bigint

Contribue à https://github.com/marienfressinaud/FreshRSS/issues/202
Alexandre Alapetite 12 лет назад
Родитель
Сommit
7f6eb66405
2 измененных файлов с 9 добавлено и 1 удалено
  1. 8 0
      app/models/Entry.php
  2. 1 1
      app/models/Feed.php

+ 8 - 0
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;
 	}

+ 1 - 1
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;