[CorreioDaFeiraBridge] cache timeout + getName fixes (#3453)

* [CorreioDaFeiraBridge] cache timeout fix

* [CorreioDaFeiraBridge] cache timeout fix

* [CorreioDaFeiraBridge] getName() fix
This commit is contained in:
rmscoelho 2023-06-22 06:27:52 +01:00 committed by GitHub
parent a4ed52ca30
commit 1b02d4f49b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -6,6 +6,7 @@ class CorreioDaFeiraBridge extends BridgeAbstract
const URI = 'https://www.correiodafeira.pt/';
const DESCRIPTION = 'Returns news from the Portuguese local newspaper Correio da Feira';
const MAINTAINER = 'rmscoelho';
const CACHE_TIMEOUT = 86400;
const PARAMETERS = [
[
'feed' => [
@ -36,11 +37,7 @@ class CorreioDaFeiraBridge extends BridgeAbstract
public function getName()
{
$feed = $this->getInput('feed');
if ($this->getInput('feed') !== null && $this->getInput('feed') !== '') {
return self::NAME . ' | ' . ucfirst($feed);
}
return self::NAME;
return !is_null($this->getKey('feed')) ? self::NAME . ' | ' . $this->getKey('feed') : self::NAME;
}
public function getURI()