aboutsummaryrefslogtreecommitdiff
path: root/app/Services
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-12-28 13:09:51 +0100
committerGravatar GitHub <noreply@github.com> 2023-12-28 13:09:51 +0100
commit65c6c2d5cb62111b4c95b0b4370edc176ee4d959 (patch)
tree740018af5713b522fc6f4c4a16373603eaf8d33d /app/Services
parent8b090ee4a3c43b69eaa789b62a9f582bd2d99fe3 (diff)
Fix export with MySQL (#5988)
fix https://github.com/FreshRSS/FreshRSS/issues/5982
Diffstat (limited to 'app/Services')
-rw-r--r--app/Services/ExportService.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/Services/ExportService.php b/app/Services/ExportService.php
index c44b2bf4b..0dbe1c8f5 100644
--- a/app/Services/ExportService.php
+++ b/app/Services/ExportService.php
@@ -90,14 +90,15 @@ class FreshRSS_Export_Service {
* It also can return null if the feed doesn’t exist.
*/
public function generateFeedEntries(int $feed_id, int $max_number_entries): ?array {
- $feed = $this->feed_dao->searchById($feed_id);
+ $view = new FreshRSS_View();
+ $view->categories = $this->category_dao->listCategories(true) ?: [];
+
+ $feed = FreshRSS_CategoryDAO::findFeed($view->categories, $feed_id);
if ($feed === null) {
return null;
}
-
- $view = new FreshRSS_View();
- $view->categories = $this->category_dao->listCategories(true) ?: [];
$view->feed = $feed;
+
$day = date('Y-m-d');
$filename = "feed_{$day}_" . $feed->categoryId() . '_' . $feed->id() . '.json';