[SkimfeedBridge] Add parameter detection (#1877)

This commit is contained in:
Alex Kirk 2020-11-29 11:28:07 +01:00 committed by GitHub
parent be9df41e07
commit 7705d097e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 29 additions and 0 deletions

View File

@ -455,6 +455,35 @@ class SkimfeedBridge extends BridgeAbstract {
}
public function detectParameters($url) {
if (0 !== strpos($url, static::URI)) {
return null;
}
foreach(self::PARAMETERS as $channels) {
foreach($channels as $box_name => $box) {
foreach($box['values'] as $name => $channel_url) {
if (static::URI . $channel_url === $url) {
return array(
$box_name => $name,
);
}
}
}
}
return null;
}
public function getName() {
switch($this->queriedContext) {