From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4bQvs06mjwz36VK for ; Mon, 23 Jun 2025 17:17:08 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4bQvrx3XTfz2y59 for ; Mon, 23 Jun 2025 17:17:05 +0000 (UTC) Received: from michael.haj.ipfire.org (michael.haj.ipfire.org [172.28.1.242]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "michael.haj.ipfire.org", Issuer "E6" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4bQvrw4tRCz2S7; Mon, 23 Jun 2025 17:17:04 +0000 (UTC) Received: by michael.haj.ipfire.org (Postfix, from userid 0) id 4bQvrw29HDzTgph; Mon, 23 Jun 2025 17:17:04 +0000 (UTC) From: Michael Tremer To: development@lists.ipfire.org Cc: dietzmann@brecht-schule.hamburg, Michael Tremer Subject: [PATCH 3/5] fwhosts.cgi: Don't show anything if a host/group is unused Date: Mon, 23 Jun 2025 17:16:56 +0000 Message-Id: <20250623171658.530138-3-michael.tremer@ipfire.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250623171658.530138-1-michael.tremer@ipfire.org> References: <20250623171658.530138-1-michael.tremer@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Signed-off-by: Michael Tremer --- html/cgi-bin/fwhosts.cgi | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi index 4e9c7f04d..69970a840 100644 --- a/html/cgi-bin/fwhosts.cgi +++ b/html/cgi-bin/fwhosts.cgi @@ -1956,8 +1956,6 @@ END my $htmlparttouse=""; if ($netusedin) { $htmlparttouse = ""; - } else { - $htmlparttouse = ""; } print"
$customnetwork{$key}[0]".&getcolor($colnet)."$customnetwork{$key}[3]$netcount x$htmlparttouse"; print<$customhost{$key}[0]".&getcolor($ip)."$customhost{$key}[3]$hostcount x$htmlparttouse"; print<"; - } else { - print ""; } if($netgrpcount == '0') { @@ -2344,8 +2338,6 @@ sub viewtablelocationgrp print "$Lang::tr{'used'}: $locationgrpcount x "; if ($locationusedin) { print ""; - } else { - print ""; } # Only display delete icon, if the group is not used by a firewall rule. if($locationgrpcount == '0') { @@ -2492,8 +2484,6 @@ END my $htmlparttouse=""; if ($serviceusedin) { $htmlparttouse=""; - } else { - $htmlparttouse=""; } if($customservice{$key}[3] eq 'All ICMP-Types'){print $Lang::tr{'fwdfw all icmp'};} elsif($customservice{$key}[3] ne 'BLANK'){print $customservice{$key}[3];} @@ -2574,8 +2564,6 @@ sub viewtableservicegrp my $srvgrpusedin=&getsrvusedin($customservicegrp{$key}[0]); if ($srvgrpusedin) { print ""; - } else { - print ""; } if($grpcount == '0') { -- 2.39.5