Explorar el Código

bridges: Return default values for getName and getURI

logmanoriginal hace 7 años
padre
commit
f694023f7d

+ 9 - 5
bridges/AnimeUltimeBridge.php

@@ -108,12 +108,16 @@ class AnimeUltimeBridge extends BridgeAbstract {
     }
 
     public function getName() {
-        $typeFilter = array_search(
-            $this->getInput('type'),
-            self::PARAMETERS[$this->queriedContext]['type']['values']
-        );
+        if(!is_null($this->getInput('type'))){
+            $typeFilter = array_search(
+                $this->getInput('type'),
+                self::PARAMETERS[$this->queriedContext]['type']['values']
+            );
+
+            return 'Latest '.$typeFilter.' - Anime-Ultime Bridge';
+        }
 
-        return 'Latest '.$typeFilter.' - Anime-Ultime Bridge';
+        return parent::getName();
     }
 
 }

+ 1 - 0
bridges/DailymotionBridge.php

@@ -85,6 +85,7 @@ class DailymotionBridge extends BridgeAbstract{
         case 'From search results':
             $specific=$this->getInput('s');
             break;
+        default: return parent::getName();
         }
 
         return $specific.' : Dailymotion Bridge';

+ 9 - 5
bridges/GBAtempBridge.php

@@ -115,10 +115,14 @@ class GBAtempBridge extends BridgeAbstract {
     }
 
     public function getName() {
-        $type=array_search(
-            $this->getInput('type'),
-            self::PARAMETERS[$this->queriedContext]['type']['values']
-        );
-        return 'GBAtemp '.$type.' Bridge';
+        if(!is_null($this->getInput('type'))){
+            $type=array_search(
+                $this->getInput('type'),
+                self::PARAMETERS[$this->queriedContext]['type']['values']
+            );
+            return 'GBAtemp '.$type.' Bridge';
+        }
+
+        return parent::getName();
     }
 }

+ 1 - 0
bridges/MangareaderBridge.php

@@ -239,6 +239,7 @@ EOD;
         case 'Get manga updates':
             $path = $this->getInput('path');
             break;
+        default: return parent::getURI();
         }
         return self::URI . $path;
     }