* [PATCH] www: more consistent URL generation line
@ 2016-03-17 23:06 Eric Wong
2016-04-02 23:20 ` Eric Wong
0 siblings, 1 reply; 2+ messages in thread
From: Eric Wong @ 2016-03-17 23:06 UTC (permalink / raw)
To: meta
It's probably good to have URLs on their own line anyways
for ease-of-reading.
---
lib/PublicInbox/WWW.pm | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm
index 369be68..9a55e49 100644
--- a/lib/PublicInbox/WWW.pm
+++ b/lib/PublicInbox/WWW.pm
@@ -275,15 +275,10 @@ sub footer {
my $http = $cgi->base->as_string . $listname;
$seen{$http} or unshift @urls, $http;
my $ssoma_url = PublicInbox::Hval::prurl($cgi->{env}, SSOMA_URL);
- if (scalar(@urls) == 1) {
- $urls = "URL for <a\nhref=\"" . $ssoma_url .
- qq(">ssoma</a> or <b>git clone --mirror \$URL</b> :) .
- $urls[0];
- } else {
- $urls = "URLs for <a\nhref=\"" . $ssoma_url .
- qq(">ssoma</a> or <b>git clone --mirror \$URL</b>\n) .
- join("\n", map { "\t$_" } @urls);
- }
+ my $s = scalar(@urls) > 1 ? 's' : '';
+ $urls = "URL$s for <a\nhref=\"" . $ssoma_url .
+ qq(">ssoma</a> or <b>git clone --mirror \$URL</b>\n) .
+ join("\n", map { "\t$_" } @urls);
my $addr = $ctx->{pi_config}->get($listname, 'address');
if (ref($addr) eq 'ARRAY') {
--
EW
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] www: more consistent URL generation line
2016-03-17 23:06 [PATCH] www: more consistent URL generation line Eric Wong
@ 2016-04-02 23:20 ` Eric Wong
0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2016-04-02 23:20 UTC (permalink / raw)
To: meta
Rejected in favor of
http://public-inbox.org/meta/20160402223213.8293-1-e@80x24.org/
('www: more explicit "git clone" usage')
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-02 23:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-17 23:06 [PATCH] www: more consistent URL generation line Eric Wong
2016-04-02 23:20 ` Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).