diff options
| author | 2024-12-10 14:57:25 +0100 | |
|---|---|---|
| committer | 2024-12-10 14:57:25 +0100 | |
| commit | ab9a4e292cab48c94e6bac818f3256f6e131c041 (patch) | |
| tree | 51e3341929570aabc61b663d24bcd44b6ba821c2 /app/views | |
| parent | 052261bb8efbb910cefbf82fa54c64f54ba79854 (diff) | |
OPML export/import for cssFullContentConditions (#7082)
Follow-up of https://github.com/FreshRSS/FreshRSS/commit/33fd07f6f26310d4806077cc87bcdf9b8b940e35, which should have been a PR.
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/helpers/export/opml.phtml | 13 | ||||
| -rw-r--r-- | app/views/helpers/feed/update.phtml | 6 |
2 files changed, 15 insertions, 4 deletions
diff --git a/app/views/helpers/export/opml.phtml b/app/views/helpers/export/opml.phtml index eecfc5d23..c37d8c7c4 100644 --- a/app/views/helpers/export/opml.phtml +++ b/app/views/helpers/export/opml.phtml @@ -82,8 +82,19 @@ function feedsToOutlines(array $feeds, bool $excludeMutedFeeds = false): array { $outline['frss:cssFullContent'] = htmlspecialchars_decode($feed->pathEntries(), ENT_QUOTES); } + if (!empty($feed->attributeArray('path_entries_conditions'))) { + $conditions = ''; + foreach ($feed->attributeArray('path_entries_conditions') as $condition) { + if (is_string($condition)) { + $conditions .= $condition . "\n"; + } + } + $conditions = trim($conditions); + $outline['frss:cssFullContentConditions'] = $conditions; + } + if ($feed->attributeString('path_entries_filter') != '') { - $outline['frss:cssFullContentFilter'] = $feed->attributeString('path_entries_filter'); + $outline['frss:cssContentFilter'] = $feed->attributeString('path_entries_filter'); } $curl_params = $feed->attributeArray('curl_params'); diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml index c73987e50..6275d5486 100644 --- a/app/views/helpers/feed/update.phtml +++ b/app/views/helpers/feed/update.phtml @@ -662,11 +662,11 @@ </div> <div class="form-group"> - <label class="group-name" for="path_entries_condition"><?= _t('sub.feed.path_entries_condition') ?></label> + <label class="group-name" for="path_entries_conditions"><?= _t('sub.feed.path_entries_conditions') ?></label> <div class="group-controls"> - <textarea class="w100" id="path_entries_condition" name="path_entries_condition" + <textarea class="w100" id="path_entries_conditions" name="path_entries_conditions" rows="3" cols="64" spellcheck="false" placeholder="<?= _t('gen.short.blank_to_disable') ?>"><?php - foreach ($this->feed->attributeArray('path_entries_condition') ?? [] as $condition) { + foreach ($this->feed->attributeArray('path_entries_conditions') ?? [] as $condition) { if (is_string($condition)) { echo htmlspecialchars($condition, ENT_NOQUOTES, 'UTF-8'), PHP_EOL; } |
