mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 15:47:32 +02:00
core: Add context hinting for new feeds
RSS-Bridge currently has to guess the queried context from the data provided by the user. This, however, can cause issues for bridges that have multiple contexts with conflicting parameters (i.e. none). This commit adds context hinting to queries via '&context=<context>' which can be omitted in which case the context is determined as before.
This commit is contained in:
@@ -214,6 +214,7 @@ class ParameterValidator {
|
||||
|
||||
switch(array_sum($queriedContexts)) {
|
||||
case 0: // Found no match, is there a context without parameters?
|
||||
if(isset($data['context'])) return $data['context'];
|
||||
foreach($queriedContexts as $context => $queried) {
|
||||
if(is_null($queried)) {
|
||||
return $context;
|
||||
|
Reference in New Issue
Block a user