Date: Sun, 08 Feb 2026 17:52:35 +0000 From: Wolfram Schneider <wosch@FreeBSD.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org Subject: git: a67913daaa - main - man.cgi: do not show the drop-down menu for architectures if empty Message-ID: <6988cd63.261ec.1f3add9e@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/doc/commit/?id=a67913daaa69d24344cd9c5fde671f1524ae8c88 commit a67913daaa69d24344cd9c5fde671f1524ae8c88 Author: Wolfram Schneider <wosch@FreeBSD.org> AuthorDate: 2026-02-08 17:52:27 +0000 Commit: Wolfram Schneider <wosch@FreeBSD.org> CommitDate: 2026-02-08 17:52:27 +0000 man.cgi: do not show the drop-down menu for architectures if empty --- website/content/en/cgi/man.cgi | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/website/content/en/cgi/man.cgi b/website/content/en/cgi/man.cgi index 4924d9f684..e77175554e 100755 --- a/website/content/en/cgi/man.cgi +++ b/website/content/en/cgi/man.cgi @@ -61,6 +61,13 @@ my $download_streaming_caching = 0; # enable to download the manual pages as a tarball my $enable_download = 1; +# show the drop-down menu for architectures +my $enable_architectures = 1; + +# show the drop-down menu for architectures even if there are no know architectures +my $enable_architectures_none = 0; + + #$command{'man'} = '/usr/bin/man'; # 8Bit clean man $command{'man'} = '/usr/local/www/bin/man.wrapper'; # set CPU limits @@ -1506,6 +1513,8 @@ sub do_man { $arch = ""; } + $arch = "" if !$enable_architectures; + # remove trailing spaces for dumb users $form{'query'} =~ s/\s+$//; $form{'query'} =~ s/^\s+//; @@ -2379,8 +2388,10 @@ ETX print qq{</select>\n}; - print qq{<select name="arch">\n}; my @arch = exists $arch{$l} ? @{ $arch{$l}->{'arch'} } : $default_arch; + if ($enable_architectures && (scalar(@arch) > 1 || $enable_architectures_none)) { + + print qq{<select name="arch">\n}; unshift @arch, 'default'; my $a; @@ -2403,6 +2414,7 @@ ETX } print qq{</select>\n\n}; + } local ($m) = &encode_url($l);home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6988cd63.261ec.1f3add9e>
