Skip to content

Commit

Permalink
feat(FilterBridge): custom feed name parameter (#4136)
Browse files Browse the repository at this point in the history
fix #4100
  • Loading branch information
dvikan authored Jun 18, 2024
1 parent 00074b9 commit d60f0b0
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions bridges/FilterBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ class FilterBridge extends FeedExpander
'exampleValue' => 'https://lorem-rss.herokuapp.com/feed?unit=day',
'required' => true,
],
'name' => [
'name' => 'Feed name (optional)',
'type' => 'text',
'exampleValue' => 'My feed',
'required' => false,
],
'filter' => [
'name' => 'Filter (regular expression!!!)',
'required' => false,
Expand Down Expand Up @@ -158,11 +164,18 @@ protected function parseItem(array $item)
public function getURI()
{
$url = $this->getInput('url');

if (empty($url)) {
$url = parent::getURI();
if ($url) {
return $url;
}
return parent::getURI();
}

return $url;
public function getName()
{
$name = $this->getInput('name');
if ($name) {
return $name;
}
return parent::getName();
}
}

0 comments on commit d60f0b0

Please sign in to comment.