bridges: Return parent::getName by default
This commit is contained in:
parent
d93d491d8e
commit
c4169f1579
29 changed files with 145 additions and 57 deletions
|
@ -51,10 +51,13 @@ 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 parent::getName();
|
||||
}
|
||||
|
||||
public function collectData() {
|
||||
|
||||
$uri = 'https://www.amazon.'.$this->getInput('tld').'/';
|
||||
|
|
|
@ -57,9 +57,13 @@ class AskfmBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
if(!is_null($this->getInput('u'))){
|
||||
return self::NAME . ' : ' . $this->getInput('u');
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
|
||||
public function getURI(){
|
||||
return self::URI . urlencode($this->getInput('u')) . '/answers/more?page=0';
|
||||
}
|
||||
|
|
|
@ -50,6 +50,10 @@ class BandcampBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
if(!is_null($this->getInput('tag'))){
|
||||
return $this->getInput('tag') . ' - Bandcamp Tag';
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,10 @@ class BooruprojectBridge extends GelbooruBridge {
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
if(!is_null($this->getInput('i'))){
|
||||
return static::NAME . ' ' . $this->getInput('i');
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,7 +83,11 @@ topic found in some section URLs, else all topics are selected.';
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
if(!is_null($this->getInput('topic'))){
|
||||
$topic = $this->getInput('topic');
|
||||
return 'CNET News Bridge' . (empty($topic) ? '' : ' - ' . $topic);
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,9 +50,13 @@ class CpasbienBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
if(!is_null($this->getInput('q'))){
|
||||
return $this->getInput('q') . ' : ' . self::NAME;
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
|
||||
private function getCachedDate($url){
|
||||
debugMessage('getting pubdate from url ' . $url . '');
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -46,6 +46,10 @@ class GoComicsBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
if(!is_null($this->getInput('comicname'))){
|
||||
return $this->getInput('comicname') . ' - GoComics';
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,6 +55,10 @@ class GoogleSearchBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
if(!is_null($this->getInput('q'))){
|
||||
return $this->getInput('q') . ' - Google search';
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,10 +70,14 @@ class HDWallpapersBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
if(!is_null($this->getInput('c')) && !is_null($this->getInput('r'))){
|
||||
return 'HDWallpapers - '
|
||||
. str_replace(['__', '_'], [' & ', ' '], $this->getInput('c'))
|
||||
. ' ['
|
||||
. $this->getInput('r')
|
||||
. ']';
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,9 +35,13 @@ class IdenticaBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
if(!is_null($this->getInput('u'))){
|
||||
return $this->getInput('u') . ' - Identica Bridge';
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
|
||||
public function getURI(){
|
||||
return self::URI . urlencode($this->getInput('u'));
|
||||
}
|
||||
|
|
|
@ -53,9 +53,13 @@ class InstagramBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
if(!is_null($this->getInput('u'))){
|
||||
return $this->getInput('u') . ' - Instagram Bridge';
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
|
||||
public function getURI(){
|
||||
return self::URI . urlencode($this->getInput('u'));
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ class KununuBridge extends BridgeAbstract {
|
|||
return ($this->companyName ?: $company) . ' - ' . self::NAME;
|
||||
}
|
||||
|
||||
return paren::getName();
|
||||
return parent::getName();
|
||||
}
|
||||
|
||||
public function collectData(){
|
||||
|
|
|
@ -16,9 +16,13 @@ class MixCloudBridge extends BridgeAbstract {
|
|||
));
|
||||
|
||||
public function getName(){
|
||||
if(!is_null($this->getInput('u'))){
|
||||
return 'MixCloud - ' . $this->getInput('u');
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
|
||||
public function collectData(){
|
||||
|
||||
$html = getSimpleHTMLDOM(self::URI . '/' . $this->getInput('u'))
|
||||
|
|
|
@ -56,6 +56,10 @@ class NovelUpdatesBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
if(!empty($this->seriesTitle)){
|
||||
return $this->seriesTitle . ' - ' . static::NAME;
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,6 +84,7 @@ class ParuVenduImmoBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
if(!is_null($this->getInput('minarea'))){
|
||||
$request = '';
|
||||
$minarea = $this->getInput('minarea');
|
||||
if(!empty($minarea)){
|
||||
|
@ -95,4 +96,7 @@ class ParuVenduImmoBridge extends BridgeAbstract {
|
|||
}
|
||||
return 'Paru Vendu Immobilier' . $request;
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,6 +82,7 @@ class PickyWallpapersBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
if(!is_null($this->getInput('s'))){
|
||||
$subcategory = $this->getInput('s');
|
||||
return 'PickyWallpapers - '
|
||||
. $this->getInput('c')
|
||||
|
@ -90,4 +91,7 @@ class PickyWallpapersBridge extends BridgeAbstract {
|
|||
. $this->getInput('r')
|
||||
. ']';
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,6 +53,10 @@ class RTBFBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
if(!is_null($this->getInput('c'))){
|
||||
return $this->getInput('c') .' - RTBF Bridge';
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,6 +55,10 @@ class SoundCloudBridge extends BridgeAbstract {
|
|||
|
||||
}
|
||||
public function getName(){
|
||||
if(!is_null($this->getInput('u'))){
|
||||
return self::NAME . ' - ' . $this->getInput('u');
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,6 +61,10 @@ class SuperbWallpapersBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
if(!is_null($this->getInput('c')) && !is_null($this->getInput('r'))){
|
||||
return self::NAME . '- ' . $this->getInput('c') . ' [' . $this->getInput('r') . ']';
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,6 +40,10 @@ class TagBoardBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
if(!is_null($this->getInput('u'))){
|
||||
return 'tagboard - ' . $this->getInput('u');
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,9 +81,13 @@ class Torrent9Bridge extends BridgeAbstract {
|
|||
|
||||
|
||||
public function getName(){
|
||||
if(!is_null($this->getInput('q'))){
|
||||
return $this->getInput('q') . ' : ' . self::NAME;
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
|
||||
private function getCachedDate($url){
|
||||
debugMessage('getting pubdate from url ' . $url . '');
|
||||
// Initialize cache
|
||||
|
|
|
@ -46,6 +46,7 @@ class TwitterBridge extends BridgeAbstract {
|
|||
$specific = '@';
|
||||
$param = 'u';
|
||||
break;
|
||||
default: return parent::getName();
|
||||
}
|
||||
return 'Twitter ' . $specific . $this->getInput($param);
|
||||
}
|
||||
|
|
|
@ -92,6 +92,7 @@ class WallpaperStopBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
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')
|
||||
|
@ -100,4 +101,7 @@ class WallpaperStopBridge extends BridgeAbstract {
|
|||
. $this->getInput('r')
|
||||
. ']';
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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){
|
||||
|
|
|
@ -38,7 +38,7 @@ class WorldOfTanksBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
return $this->title ?: self::NAME;
|
||||
return $this->title ?: parent::getName();
|
||||
}
|
||||
|
||||
public function collectData(){
|
||||
|
|
|
@ -194,6 +194,6 @@ abstract class FeedExpander extends BridgeAbstract {
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
return $this->name;
|
||||
return $this->name ?: parent::getName();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue