From 91165cdd0d49124de6b0d21393584fc83688aff7 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Mon, 27 Nov 2017 15:05:50 -0500 Subject: [PATCH] Fix breakage caused by last comit --- lib/Database.php | 6 +++++- tests/lib/Database/SeriesArticle.php | 14 +++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/Database.php b/lib/Database.php index 577d3b39..e7f33cf1 100644 --- a/lib/Database.php +++ b/lib/Database.php @@ -1021,13 +1021,17 @@ class Database { "url_title_hash||':'||url_content_hash||':'||title_content_hash as fingerprint", ]); case self::LIST_MINIMAL: // base metadata (always included: required for context matching) - // id, subscription, feed, modified_date, marked_date, unread, starred, edition + $columns = array_merge($columns,[ + // id, subscription, feed, modified_date, marked_date, unread, starred, edition + "edited as edited_date", + ]); break; default: throw new Exception("constantUnknown", $fields); } $q = $this->articleQuery($user, $context, $columns); $q->setOrder("edited_date".($context->reverse ? " desc" : "")); + $q->setOrder("edition".($context->reverse ? " desc" : "")); $q->setJoin("left join arsse_enclosures on arsse_enclosures.article is arsse_articles.id"); // perform the query and return results return $this->db->prepare($q->getQuery(), $q->getTypes())->run($q->getValues()); diff --git a/tests/lib/Database/SeriesArticle.php b/tests/lib/Database/SeriesArticle.php index 40f748b0..caf65372 100644 --- a/tests/lib/Database/SeriesArticle.php +++ b/tests/lib/Database/SeriesArticle.php @@ -364,20 +364,20 @@ trait SeriesArticle { ]; protected $fields = [ Database::LIST_MINIMAL => [ - "id", "subscription", "feed", "modified_date", "marked_date", "unread", "starred", "edition", + "id", "subscription", "feed", "modified_date", "marked_date", "unread", "starred", "edition", "edited_date", ], Database::LIST_CONSERVATIVE => [ - "id", "subscription", "feed", "modified_date", "marked_date", "unread", "starred", "edition", - "url", "title", "subscription_title", "author", "guid", "published_date", "edited_date", "fingerprint", + "id", "subscription", "feed", "modified_date", "marked_date", "unread", "starred", "edition", "edited_date", + "url", "title", "subscription_title", "author", "guid", "published_date", "fingerprint", ], Database::LIST_TYPICAL => [ - "id", "subscription", "feed", "modified_date", "marked_date", "unread", "starred", "edition", - "url", "title", "subscription_title", "author", "guid", "published_date", "edited_date", "fingerprint", + "id", "subscription", "feed", "modified_date", "marked_date", "unread", "starred", "edition", "edited_date", + "url", "title", "subscription_title", "author", "guid", "published_date", "fingerprint", "content", "media_url", "media_type", ], Database::LIST_FULL => [ - "id", "subscription", "feed", "modified_date", "marked_date", "unread", "starred", "edition", - "url", "title", "subscription_title", "author", "guid", "published_date", "edited_date", "fingerprint", + "id", "subscription", "feed", "modified_date", "marked_date", "unread", "starred", "edition", "edited_date", + "url", "title", "subscription_title", "author", "guid", "published_date", "fingerprint", "content", "media_url", "media_type", "note", ],