aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Bocki <henning@bocklage.com> 2023-03-06 20:01:51 +0100
committerGravatar GitHub <noreply@github.com> 2023-03-06 20:01:51 +0100
commitf0e5ef0fc58f3796bb4c03caa2c5e7ca78de119e (patch)
tree3fc1c388de7bebf2a0b729237864465f3dbdd915 /lib
parentb40714079ff106700fb27e6a8fd12d77fb3d0e76 (diff)
downloadrss-bridge-f0e5ef0fc58f3796bb4c03caa2c5e7ca78de119e.tar.gz
rss-bridge-f0e5ef0fc58f3796bb4c03caa2c5e7ca78de119e.tar.zst
rss-bridge-f0e5ef0fc58f3796bb4c03caa2c5e7ca78de119e.zip
[Various] getKey replacements and docu (#3283)
* [Various] getKey replacements and docu * more bridges and fix to the abstract * linting * revert bandcampdaily. doing more than i thought
Diffstat (limited to 'lib')
-rw-r--r--lib/BridgeAbstract.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/BridgeAbstract.php b/lib/BridgeAbstract.php
index ecbb2529..8ebca650 100644
--- a/lib/BridgeAbstract.php
+++ b/lib/BridgeAbstract.php
@@ -306,8 +306,16 @@ abstract class BridgeAbstract implements BridgeInterface
if (!isset($this->inputs[$this->queriedContext][$input]['value'])) {
return null;
}
+ if (array_key_exists('global', static::PARAMETERS)) {
+ if (array_key_exists($input, static::PARAMETERS['global'])) {
+ $context = 'global';
+ }
+ }
+ if (!isset($context)) {
+ $context = $this->queriedContext;
+ }
$needle = $this->inputs[$this->queriedContext][$input]['value'];
- foreach (static::PARAMETERS[$this->queriedContext][$input]['values'] as $first_level_key => $first_level_value) {
+ foreach (static::PARAMETERS[$context][$input]['values'] as $first_level_key => $first_level_value) {
if ($needle === (string)$first_level_value) {
return $first_level_key;
} elseif (is_array($first_level_value)) {