about summary refs log tree commit diff
path: root/overlays/patches/public-inbox/0003-view-don-t-show-page-if-no-links-follow-it.patch
diff options
context:
space:
mode:
Diffstat (limited to 'overlays/patches/public-inbox/0003-view-don-t-show-page-if-no-links-follow-it.patch')
-rw-r--r--overlays/patches/public-inbox/0003-view-don-t-show-page-if-no-links-follow-it.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/overlays/patches/public-inbox/0003-view-don-t-show-page-if-no-links-follow-it.patch b/overlays/patches/public-inbox/0003-view-don-t-show-page-if-no-links-follow-it.patch
new file mode 100644
index 000000000000..811d6149d994
--- /dev/null
+++ b/overlays/patches/public-inbox/0003-view-don-t-show-page-if-no-links-follow-it.patch
@@ -0,0 +1,27 @@
+From 054697a5129725f900a84bbdfee356a4f5373376 Mon Sep 17 00:00:00 2001
+From: Alyssa Ross <hi@alyssa.is>
+Date: Thu, 16 Jan 2020 18:08:33 +0000
+Subject: [PATCH 3/5] view: don't show `page:' if no links follow it
+
+---
+ lib/PublicInbox/View.pm | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
+index 39b04174..aebf7fe9 100644
+--- a/lib/PublicInbox/View.pm
++++ b/lib/PublicInbox/View.pm
+@@ -1157,7 +1157,9 @@ sub pagination_footer ($$) {
+ 		$next = $next ? "$next " : '     ';
+ 		$prev .= qq! <a\nhref='$latest'>latest</a>!;
+ 	}
+-	"<hr><pre>page: $next$prev</pre>";
++	if ($prev || $next) {
++		"<hr><pre>page: $next$prev</pre>";
++	}
+ }
+ 
+ sub index_nav { # callback for WwwStream
+-- 
+2.26.1
+