git: a67913daaa - main - man.cgi: do not show the drop-down menu for architectures if empty

Wolfram Schneider <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
The branch main has been updated by wosch:

URL: https://cgit.FreeBSD.org/doc/commit/?id=a67913daaa69d24344cd9c5fde671f1524ae8c88

commit a67913daaa69d24344cd9c5fde671f1524ae8c88
Author:     Wolfram Schneider <[email protected]>
AuthorDate: 2026-02-08 17:52:27 +0000
Commit:     Wolfram Schneider <[email protected]>
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);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.