From 9a52832348bdf5a7715e8fe7e4b72562807b490b Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Thu, 5 Sep 2024 14:08:06 +0200 Subject: [PATCH] parse rss in reverse to respect timing --- epub.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epub.php b/epub.php index 562347c..1ab6535 100644 --- a/epub.php +++ b/epub.php @@ -396,7 +396,7 @@ $xml = new SimpleXMLElement($feed); $items = $xml->xpath("/rss/channel/item"); - foreach ($items as $item) + foreach (array_reverse($items) as $item) { add_mp_article($item->link, $context, $epub); } @@ -518,7 +518,7 @@ $xml = new SimpleXMLElement($feed); $items = $xml->xpath("/rss/channel/item"); - foreach ($items as $item) + foreach (array_reverse($items) as $item) { $title = $item->title; $author = $item->xpath('dc:creator')[0];