bridges: add context to detectParameters (#3607)

* bridges: add context to detectParameters

Some bridges did not return the context parameter but they used it in
the parameters

* bridges: add context to detectParameters

Fix test for InstagramBridge
This commit is contained in:
sysadminstory 2023-08-09 22:40:24 +02:00 committed by GitHub
parent 6cc4cf24dc
commit 52d3cce59d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 115 additions and 80 deletions

View file

@ -455,11 +455,12 @@ class SkimfeedBridge extends BridgeAbstract
return null;
}
foreach (self::PARAMETERS as $channels) {
foreach (self::PARAMETERS as $context => $channels) {
foreach ($channels as $box_name => $box) {
foreach ($box['values'] as $name => $channel_url) {
if (static::URI . $channel_url === $url) {
return [
'context' => $context,
$box_name => $name,
];
}