summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-03-29 21:30:37 +0200
committerGravatar GitHub <noreply@github.com> 2023-03-29 21:30:37 +0200
commitea877080108aa5846d07a0039083d3cc6fdc2ba9 (patch)
treef930c44bb6da6c6f4b860c3a267cd2c84d7cf3e9
parentbb6bc8fe2c9410d2c8c56ada9e2dff800c715189 (diff)
Fix OPML export (#5238)
Regression from https://github.com/FreshRSS/FreshRSS/pull/4403
-rw-r--r--app/views/helpers/export/opml.phtml6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/views/helpers/export/opml.phtml b/app/views/helpers/export/opml.phtml
index 64dc18eba..4df36b122 100644
--- a/app/views/helpers/export/opml.phtml
+++ b/app/views/helpers/export/opml.phtml
@@ -79,7 +79,7 @@ $opml_array = [
];
if (!empty($this->categories)) {
- foreach ($this->categories as $key => $cat) {
+ foreach ($this->categories as $cat) {
$outline = [
'text' => htmlspecialchars_decode($cat->name(), ENT_QUOTES),
'@outlines' => feedsToOutlines($cat->feeds(), $this->excludeMutedFeeds),
@@ -89,12 +89,12 @@ if (!empty($this->categories)) {
$outline['frss:opmlUrl'] = $cat->attributes('opml_url');
}
- $opml_array['body'][$key] = $outline;
+ $opml_array['body'][] = $outline;
}
}
if (!empty($this->feeds)) {
- $opml_array['body'][] = feedsToOutlines($this->feeds, $this->excludeMutedFeeds);
+ $opml_array['body'] = array_merge($opml_array['body'], feedsToOutlines($this->feeds, $this->excludeMutedFeeds));
}
$libopml = new \marienfressinaud\LibOpml\LibOpml(true);