orrg

online rss & atom feed reader for gemini
git clone https://git.clttr.info/orrg.git
Log (Feed) | Files | Refs (Tags) | README | LICENSE

commit ecf0d4d8ec1179291f21d20237d19026eb60c7d3
parent 226986013afd88a8b39ef37d5b6f85b63107d1ee
Author: René Wagner <rwagner@rw-net.de>
Date:   Tue,  8 Dec 2020 13:22:47 +0100

fix displaying of feeds without names

Diffstat:
Mpopular.pl | 2+-
Mrecent.pl | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/popular.pl b/popular.pl @@ -35,7 +35,7 @@ sub create_response my $c = 0; foreach (reverse @sorted) { my ($cnt, $uri, $name) = split / /, $_, 3; - push @body, '=> orrg.pl?'. uri_escape($uri) .' '. $name; + push @body, '=> orrg.pl?'. uri_escape($uri) .' '. ($name eq '' ? $uri : $name); ++$c < 10 or last; } diff --git a/recent.pl b/recent.pl @@ -33,7 +33,7 @@ sub create_response if ( defined($recents) ) { foreach (@$recents) { my ($uri, $name) = split / /, $_, 2; - push @body, '=> orrg.pl?'. uri_escape($uri) .' '. $name; + push @body, '=> orrg.pl?'. uri_escape($uri) .' '. ($name eq '' ? $uri : $name); } } else { push @body, 'No feeds found';