mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-23 08:33:24 +02:00
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:
@@ -670,7 +670,15 @@ class TrelloBridge extends BridgeAbstract
|
||||
{
|
||||
$regex = '/^(https?:\/\/)?trello\.com\/([bc])\/([^\/?\n]+)/';
|
||||
if (preg_match($regex, $url, $matches) > 0) {
|
||||
return [$matches[2] => $matches[3]];
|
||||
if ($matches[2] == 'b') {
|
||||
$context = 'Board';
|
||||
} else if ($matches[2] == 'c') {
|
||||
$context = 'Card';
|
||||
}
|
||||
return [
|
||||
'context' => $context,
|
||||
$matches[2] => $matches[3]
|
||||
];
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user