]> Git — Sourcephile - sourcephile-nix.git/blob - nixpkgs/pkgs/public-inbox/0003-view-don-t-show-page-if-no-links-follow-it.patch
losurdo: nginx: enable on wg-intra
[sourcephile-nix.git] / nixpkgs / pkgs / public-inbox / 0003-view-don-t-show-page-if-no-links-follow-it.patch
1 From 054697a5129725f900a84bbdfee356a4f5373376 Mon Sep 17 00:00:00 2001
2 From: Alyssa Ross <hi@alyssa.is>
3 Date: Thu, 16 Jan 2020 18:08:33 +0000
4 Subject: [PATCH 3/5] view: don't show `page:' if no links follow it
5
6 ---
7 lib/PublicInbox/View.pm | 4 +++-
8 1 file changed, 3 insertions(+), 1 deletion(-)
9
10 diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
11 index 39b04174..aebf7fe9 100644
12 --- a/lib/PublicInbox/View.pm
13 +++ b/lib/PublicInbox/View.pm
14 @@ -1157,7 +1157,9 @@ sub pagination_footer ($$) {
15 $next = $next ? "$next " : ' ';
16 $prev .= qq! <a\nhref='$latest'>latest</a>!;
17 }
18 - "<hr><pre>page: $next$prev</pre>";
19 + if ($prev || $next) {
20 + "<hr><pre>page: $next$prev</pre>";
21 + }
22 }
23
24 sub index_nav { # callback for WwwStream
25 --
26 2.26.1
27