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:
logmanoriginal 2019-06-21 19:08:59 +02:00
parent e2bca5bb05
commit 1591e18027
3 changed files with 19 additions and 4 deletions

View file

@ -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;