1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-09-03 05:02:43 +02:00

refactor/fix (#3924)

This commit is contained in:
Dag
2024-01-25 13:03:00 +01:00
committed by GitHub
parent 06b299e627
commit 9574c17ddc
9 changed files with 153 additions and 178 deletions

View File

@@ -98,7 +98,16 @@ class DisplayAction implements ActionInterface
try {
$bridge->loadConfiguration();
// Remove parameters that don't concern bridges
$input = array_diff_key($request, array_fill_keys(['action', 'bridge', 'format', '_noproxy', '_cache_timeout', '_error_time'], ''));
$remove = [
'action',
'bridge',
'format',
'_noproxy',
'_cache_timeout',
'_error_time',
'_', // Some RSS readers add a cache-busting parameter (_=<timestamp>) to feed URLs, detect and ignore them.
];
$input = array_diff_key($request, array_fill_keys($remove, ''));
$bridge->setInput($input);
$bridge->collectData();
$items = $bridge->getItems();