Cleanup2017: Delete unused function from fwhosts.cgi

Submitted by Alexander Marx on June 8, 2017, 6:23 a.m.

Details

Message ID 1496903032-6427-1-git-send-email-alexander.marx@ipfire.org
State Staged
Commit e92436970635991f9e161da416c040a31ae23a5a
Headers show

Commit Message

Alexander Marx June 8, 2017, 6:23 a.m.
This function is not used by any other script.

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
---
 html/cgi-bin/fwhosts.cgi | 12 ------------
 1 file changed, 12 deletions(-)

Patch hide | download patch | download mbox

diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi
index 25ab489..a2ade8a 100644
--- a/html/cgi-bin/fwhosts.cgi
+++ b/html/cgi-bin/fwhosts.cgi
@@ -2555,18 +2555,6 @@  sub checkip
 	}
 	return 1;
 }
-sub checksubnet
-{
-	my %hash=%{(shift)};
-	&General::readhasharray("$confignet", \%hash);
-	foreach my $key (keys %hash) {
-		if(&General::IpInSubnet($fwhostsettings{'IP'},$hash{$key}[1],$hash{$key}[2]))
-		{
-			return 1;
-		}
-	}
-	return 0;
-}
 sub checkservicegroup
 {
 	&General::readhasharray("$configsrvgrp", \%customservicegrp);

Comments

Michael Tremer June 8, 2017, 2:14 p.m.
Hey,

yes indeed. There is much more where this one came from...

-Michael

On Thu, 2017-06-08 at 08:23 +0200, Alexander Marx wrote:
> This function is not used by any other script.
> 
> Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
> ---
>  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 25ab489..a2ade8a 100644
> --- a/html/cgi-bin/fwhosts.cgi
> +++ b/html/cgi-bin/fwhosts.cgi
> @@ -2555,18 +2555,6 @@ sub checkip
>  	}
>  	return 1;
>  }
> -sub checksubnet
> -{
> -	my %hash=%{(shift)};
> -	&General::readhasharray("$confignet", \%hash);
> -	foreach my $key (keys %hash) {
> -		if(&General::IpInSubnet($fwhostsettings{'IP'},$hash{$key}[1],
> $hash{$key}[2]))
> -		{
> -			return 1;
> -		}
> -	}
> -	return 0;
> -}
>  sub checkservicegroup
>  {
>  	&General::readhasharray("$configsrvgrp", \%customservicegrp);