diff --git a/bridges/AllocineFRBridge.php b/bridges/AllocineFRBridge.php index 74601c9..91e3305 100644 --- a/bridges/AllocineFRBridge.php +++ b/bridges/AllocineFRBridge.php @@ -44,11 +44,11 @@ class AllocineFRBridge extends BridgeAbstract { public function getName(){ if(!is_null($this->getInput('category'))){ - return self::NAME . ' : ' - .array_search( - $this->getInput('category'), - self::PARAMETERS[$this->queriedContext]['category']['values'] - ); + return self::NAME . ' : ' + .array_search( + $this->getInput('category'), + self::PARAMETERS[$this->queriedContext]['category']['values'] + ); } return parent::getName(); diff --git a/bridges/AmazonBridge.php b/bridges/AmazonBridge.php index 5dbef29..d7f77c5 100644 --- a/bridges/AmazonBridge.php +++ b/bridges/AmazonBridge.php @@ -51,8 +51,11 @@ class AmazonBridge extends BridgeAbstract { )); public function getName(){ + if(!is_null($this->getInput('tld')) && !is_null($this->getInput('q'))){ + return 'Amazon.'.$this->getInput('tld').': '.$this->getInput('q'); + } - return 'Amazon.'.$this->getInput('tld').': '.$this->getInput('q'); + return parent::getName(); } public function collectData() { diff --git a/bridges/AskfmBridge.php b/bridges/AskfmBridge.php index 85d469f..e871c9c 100644 --- a/bridges/AskfmBridge.php +++ b/bridges/AskfmBridge.php @@ -57,7 +57,11 @@ class AskfmBridge extends BridgeAbstract { } public function getName(){ - return self::NAME . ' : ' . $this->getInput('u'); + if(!is_null($this->getInput('u'))){ + return self::NAME . ' : ' . $this->getInput('u'); + } + + return parent::getName(); } public function getURI(){ diff --git a/bridges/BandcampBridge.php b/bridges/BandcampBridge.php index 7156de4..818a2d0 100644 --- a/bridges/BandcampBridge.php +++ b/bridges/BandcampBridge.php @@ -50,6 +50,10 @@ class BandcampBridge extends BridgeAbstract { } public function getName(){ - return $this->getInput('tag') . ' - Bandcamp Tag'; + if(!is_null($this->getInput('tag'))){ + return $this->getInput('tag') . ' - Bandcamp Tag'; + } + + return parent::getName(); } } diff --git a/bridges/BooruprojectBridge.php b/bridges/BooruprojectBridge.php index d60a9f2..35b5149 100644 --- a/bridges/BooruprojectBridge.php +++ b/bridges/BooruprojectBridge.php @@ -32,6 +32,10 @@ class BooruprojectBridge extends GelbooruBridge { } public function getName(){ - return static::NAME . ' ' . $this->getInput('i'); + if(!is_null($this->getInput('i'))){ + return static::NAME . ' ' . $this->getInput('i'); + } + + return parent::getName(); } } diff --git a/bridges/CNETBridge.php b/bridges/CNETBridge.php index fa76ec0..0abd02c 100644 --- a/bridges/CNETBridge.php +++ b/bridges/CNETBridge.php @@ -83,7 +83,11 @@ topic found in some section URLs, else all topics are selected.'; } public function getName(){ - $topic = $this->getInput('topic'); - return 'CNET News Bridge' . (empty($topic) ? '' : ' - ' . $topic); + if(!is_null($this->getInput('topic'))){ + $topic = $this->getInput('topic'); + return 'CNET News Bridge' . (empty($topic) ? '' : ' - ' . $topic); + } + + return parent::getName(); } } diff --git a/bridges/CpasbienBridge.php b/bridges/CpasbienBridge.php index 0773d11..9ca95f4 100644 --- a/bridges/CpasbienBridge.php +++ b/bridges/CpasbienBridge.php @@ -50,7 +50,11 @@ class CpasbienBridge extends BridgeAbstract { } public function getName(){ - return $this->getInput('q') . ' : ' . self::NAME; + if(!is_null($this->getInput('q'))){ + return $this->getInput('q') . ' : ' . self::NAME; + } + + return parent::getName(); } private function getCachedDate($url){ diff --git a/bridges/FacebookBridge.php b/bridges/FacebookBridge.php index 04898cb..efc9326 100644 --- a/bridges/FacebookBridge.php +++ b/bridges/FacebookBridge.php @@ -257,6 +257,11 @@ EOD; } public function getName(){ - return isset($this->extraInfos['name']) ? $this->extraInfos['name'] : $this->authorName . ' - Facebook Bridge'; + if(!empty($this->authorName)){ + return isset($this->extraInfos['name']) ? $this->extraInfos['name'] : $this->authorName + . ' - Facebook Bridge'; + } + + return parent::getName(); } } diff --git a/bridges/GithubIssueBridge.php b/bridges/GithubIssueBridge.php index ba5b5e2..d1f1cc6 100644 --- a/bridges/GithubIssueBridge.php +++ b/bridges/GithubIssueBridge.php @@ -47,6 +47,7 @@ class GithubIssueBridge extends BridgeAbstract { case 'Issue comments': $name = static::NAME . ' ' . $name . ' #' . $this->getInput('i'); break; + default: return parent::getName(); } return $name; } diff --git a/bridges/GoComicsBridge.php b/bridges/GoComicsBridge.php index b9d6b2d..851e11f 100644 --- a/bridges/GoComicsBridge.php +++ b/bridges/GoComicsBridge.php @@ -46,6 +46,10 @@ class GoComicsBridge extends BridgeAbstract { } public function getName(){ - return $this->getInput('comicname') . ' - GoComics'; + if(!is_null($this->getInput('comicname'))){ + return $this->getInput('comicname') . ' - GoComics'; + } + + return parent::getName(); } } diff --git a/bridges/GoogleSearchBridge.php b/bridges/GoogleSearchBridge.php index bd07f36..67e14dc 100644 --- a/bridges/GoogleSearchBridge.php +++ b/bridges/GoogleSearchBridge.php @@ -55,6 +55,10 @@ class GoogleSearchBridge extends BridgeAbstract { } public function getName(){ - return $this->getInput('q') . ' - Google search'; + if(!is_null($this->getInput('q'))){ + return $this->getInput('q') . ' - Google search'; + } + + return parent::getName(); } } diff --git a/bridges/HDWallpapersBridge.php b/bridges/HDWallpapersBridge.php index 309c3fd..29f9c00 100644 --- a/bridges/HDWallpapersBridge.php +++ b/bridges/HDWallpapersBridge.php @@ -70,10 +70,14 @@ class HDWallpapersBridge extends BridgeAbstract { } public function getName(){ - return 'HDWallpapers - ' - . str_replace(['__', '_'], [' & ', ' '], $this->getInput('c')) - . ' [' - . $this->getInput('r') - . ']'; + if(!is_null($this->getInput('c')) && !is_null($this->getInput('r'))){ + return 'HDWallpapers - ' + . str_replace(['__', '_'], [' & ', ' '], $this->getInput('c')) + . ' [' + . $this->getInput('r') + . ']'; + } + + return parent::getName(); } } diff --git a/bridges/IdenticaBridge.php b/bridges/IdenticaBridge.php index 05d832a..ca101f4 100644 --- a/bridges/IdenticaBridge.php +++ b/bridges/IdenticaBridge.php @@ -35,7 +35,11 @@ class IdenticaBridge extends BridgeAbstract { } public function getName(){ - return $this->getInput('u') . ' - Identica Bridge'; + if(!is_null($this->getInput('u'))){ + return $this->getInput('u') . ' - Identica Bridge'; + } + + return parent::getName(); } public function getURI(){ diff --git a/bridges/InstagramBridge.php b/bridges/InstagramBridge.php index 36240b1..555a255 100644 --- a/bridges/InstagramBridge.php +++ b/bridges/InstagramBridge.php @@ -53,7 +53,11 @@ class InstagramBridge extends BridgeAbstract { } public function getName(){ - return $this->getInput('u') . ' - Instagram Bridge'; + if(!is_null($this->getInput('u'))){ + return $this->getInput('u') . ' - Instagram Bridge'; + } + + return parent::getName(); } public function getURI(){ diff --git a/bridges/KununuBridge.php b/bridges/KununuBridge.php index 083f660..ad3fdea 100644 --- a/bridges/KununuBridge.php +++ b/bridges/KununuBridge.php @@ -70,7 +70,7 @@ class KununuBridge extends BridgeAbstract { return ($this->companyName ?: $company) . ' - ' . self::NAME; } - return paren::getName(); + return parent::getName(); } public function collectData(){ diff --git a/bridges/MixCloudBridge.php b/bridges/MixCloudBridge.php index f9ae7fe..04fbb96 100644 --- a/bridges/MixCloudBridge.php +++ b/bridges/MixCloudBridge.php @@ -16,7 +16,11 @@ class MixCloudBridge extends BridgeAbstract { )); public function getName(){ - return 'MixCloud - ' . $this->getInput('u'); + if(!is_null($this->getInput('u'))){ + return 'MixCloud - ' . $this->getInput('u'); + } + + return parent::getName(); } public function collectData(){ diff --git a/bridges/NovelUpdatesBridge.php b/bridges/NovelUpdatesBridge.php index bb40b89..1a5880c 100644 --- a/bridges/NovelUpdatesBridge.php +++ b/bridges/NovelUpdatesBridge.php @@ -56,6 +56,10 @@ class NovelUpdatesBridge extends BridgeAbstract { } public function getName(){ + if(!empty($this->seriesTitle)){ return $this->seriesTitle . ' - ' . static::NAME; + } + + return parent::getName(); } } diff --git a/bridges/ParuVenduImmoBridge.php b/bridges/ParuVenduImmoBridge.php index 6a6f144..5d050ae 100644 --- a/bridges/ParuVenduImmoBridge.php +++ b/bridges/ParuVenduImmoBridge.php @@ -84,15 +84,19 @@ class ParuVenduImmoBridge extends BridgeAbstract { } public function getName(){ - $request = ''; - $minarea = $this->getInput('minarea'); - if(!empty($minarea)){ - $request .= ' ' . $minarea . ' m2'; + if(!is_null($this->getInput('minarea'))){ + $request = ''; + $minarea = $this->getInput('minarea'); + if(!empty($minarea)){ + $request .= ' ' . $minarea . ' m2'; + } + $location = $this->getInput('lo'); + if(!empty($location)){ + $request .= ' In: ' . $location; + } + return 'Paru Vendu Immobilier' . $request; } - $location = $this->getInput('lo'); - if(!empty($location)){ - $request .= ' In: ' . $location; - } - return 'Paru Vendu Immobilier' . $request; + + return parent::getName(); } } diff --git a/bridges/PickyWallpapersBridge.php b/bridges/PickyWallpapersBridge.php index a2be7ed..43e91c5 100644 --- a/bridges/PickyWallpapersBridge.php +++ b/bridges/PickyWallpapersBridge.php @@ -82,12 +82,16 @@ class PickyWallpapersBridge extends BridgeAbstract { } public function getName(){ - $subcategory = $this->getInput('s'); - return 'PickyWallpapers - ' - . $this->getInput('c') - . ($subcategory ? ' > ' . $subcategory : '') - . ' [' - . $this->getInput('r') - . ']'; + if(!is_null($this->getInput('s'))){ + $subcategory = $this->getInput('s'); + return 'PickyWallpapers - ' + . $this->getInput('c') + . ($subcategory ? ' > ' . $subcategory : '') + . ' [' + . $this->getInput('r') + . ']'; + } + + return parent::getName(); } } diff --git a/bridges/RTBFBridge.php b/bridges/RTBFBridge.php index 9303908..6109704 100644 --- a/bridges/RTBFBridge.php +++ b/bridges/RTBFBridge.php @@ -53,6 +53,10 @@ class RTBFBridge extends BridgeAbstract { } public function getName(){ - return $this->getInput('c') .' - RTBF Bridge'; + if(!is_null($this->getInput('c'))){ + return $this->getInput('c') .' - RTBF Bridge'; + } + + return parent::getName(); } } diff --git a/bridges/SoundcloudBridge.php b/bridges/SoundcloudBridge.php index cb4ba91..ea80d56 100644 --- a/bridges/SoundcloudBridge.php +++ b/bridges/SoundcloudBridge.php @@ -55,6 +55,10 @@ class SoundCloudBridge extends BridgeAbstract { } public function getName(){ - return self::NAME . ' - ' . $this->getInput('u'); + if(!is_null($this->getInput('u'))){ + return self::NAME . ' - ' . $this->getInput('u'); + } + + return parent::getName(); } } diff --git a/bridges/SuperbWallpapersBridge.php b/bridges/SuperbWallpapersBridge.php index 7f7195d..874f3ab 100644 --- a/bridges/SuperbWallpapersBridge.php +++ b/bridges/SuperbWallpapersBridge.php @@ -61,6 +61,10 @@ class SuperbWallpapersBridge extends BridgeAbstract { } public function getName(){ - return self::NAME . '- ' . $this->getInput('c') . ' [' . $this->getInput('r') . ']'; + if(!is_null($this->getInput('c')) && !is_null($this->getInput('r'))){ + return self::NAME . '- ' . $this->getInput('c') . ' [' . $this->getInput('r') . ']'; + } + + return parent::getName(); } } diff --git a/bridges/TagBoardBridge.php b/bridges/TagBoardBridge.php index 1845d22..d2f74bf 100644 --- a/bridges/TagBoardBridge.php +++ b/bridges/TagBoardBridge.php @@ -40,6 +40,10 @@ class TagBoardBridge extends BridgeAbstract { } public function getName(){ - return 'tagboard - ' . $this->getInput('u'); + if(!is_null($this->getInput('u'))){ + return 'tagboard - ' . $this->getInput('u'); + } + + return parent::getName(); } } diff --git a/bridges/Torrent9Bridge.php b/bridges/Torrent9Bridge.php index fe0a944..a339e58 100644 --- a/bridges/Torrent9Bridge.php +++ b/bridges/Torrent9Bridge.php @@ -81,7 +81,11 @@ class Torrent9Bridge extends BridgeAbstract { public function getName(){ - return $this->getInput('q') . ' : ' . self::NAME; + if(!is_null($this->getInput('q'))){ + return $this->getInput('q') . ' : ' . self::NAME; + } + + return parent::getName(); } private function getCachedDate($url){ diff --git a/bridges/TwitterBridge.php b/bridges/TwitterBridge.php index 18de5d8..60f2eae 100644 --- a/bridges/TwitterBridge.php +++ b/bridges/TwitterBridge.php @@ -46,6 +46,7 @@ class TwitterBridge extends BridgeAbstract { $specific = '@'; $param = 'u'; break; + default: return parent::getName(); } return 'Twitter ' . $specific . $this->getInput($param); } diff --git a/bridges/WallpaperStopBridge.php b/bridges/WallpaperStopBridge.php index ce0cbb9..87be0d1 100644 --- a/bridges/WallpaperStopBridge.php +++ b/bridges/WallpaperStopBridge.php @@ -92,12 +92,16 @@ class WallpaperStopBridge extends BridgeAbstract { } public function getName(){ - $subcategory = $this->getInput('s'); - return 'WallpaperStop - ' - . $this->getInput('c') - . (!empty($subcategory) ? ' > ' . $subcategory : '') - . ' [' - . $this->getInput('r') - . ']'; + if(!is_null($this->getInput('s')) && !is_null($this->getInput('c')) && !is_null($this->getInput('r'))){ + $subcategory = $this->getInput('s'); + return 'WallpaperStop - ' + . $this->getInput('c') + . (!empty($subcategory) ? ' > ' . $subcategory : '') + . ' [' + . $this->getInput('r') + . ']'; + } + + return parent::getName(); } } diff --git a/bridges/WikipediaBridge.php b/bridges/WikipediaBridge.php index 7bda015..2410656 100644 --- a/bridges/WikipediaBridge.php +++ b/bridges/WikipediaBridge.php @@ -56,9 +56,7 @@ class WikipediaBridge extends BridgeAbstract { case 'dyk': $subject = WIKIPEDIA_SUBJECT_DYK; break; - default: - $subject = WIKIPEDIA_SUBJECT_TFA; - break; + default: return parent::getName(); } switch($subject){ diff --git a/bridges/WorldOfTanksBridge.php b/bridges/WorldOfTanksBridge.php index c59cdaa..21f37d7 100644 --- a/bridges/WorldOfTanksBridge.php +++ b/bridges/WorldOfTanksBridge.php @@ -38,7 +38,7 @@ class WorldOfTanksBridge extends BridgeAbstract { } public function getName(){ - return $this->title ?: self::NAME; + return $this->title ?: parent::getName(); } public function collectData(){ diff --git a/lib/FeedExpander.php b/lib/FeedExpander.php index c66ca72..eb9940f 100644 --- a/lib/FeedExpander.php +++ b/lib/FeedExpander.php @@ -194,6 +194,6 @@ abstract class FeedExpander extends BridgeAbstract { } public function getName(){ - return $this->name; + return $this->name ?: parent::getName(); } }