mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 19:23:24 +02:00
Forward Firewall: changed sortorder of servicedropdown in servicegrouping.
catched F5 when editing a host-Now no entry is saved in customhosts table theres only the IP shown (deleted subnet)
This commit is contained in:
committed by
Michael Tremer
parent
bfee206c98
commit
0013abb07c
@@ -482,7 +482,6 @@ if ($fwhostsettings{'ACTION'} eq 'savehost')
|
|||||||
if($fwhostsettings{'newhost'} eq 'on'){$count=0;}
|
if($fwhostsettings{'newhost'} eq 'on'){$count=0;}
|
||||||
$customhost{$key}[3] = $count;
|
$customhost{$key}[3] = $count;
|
||||||
&General::writehasharray("$confighost", \%customhost);
|
&General::writehasharray("$confighost", \%customhost);
|
||||||
#$fwhostsettings{'IP'} = $fwhostsettings{'IP'}."/".&General::iporsubtodec($fwhostsettings{'SUBNET'});
|
|
||||||
undef %customhost;
|
undef %customhost;
|
||||||
$fwhostsettings{'HOSTNAME'}='';
|
$fwhostsettings{'HOSTNAME'}='';
|
||||||
$fwhostsettings{'IP'}='';
|
$fwhostsettings{'IP'}='';
|
||||||
@@ -1269,7 +1268,7 @@ END
|
|||||||
<tr><td width='1%' nowrap='nowrap'>$Lang::tr{'fwhost cust service'}</td><td><select name='CUST_SRV' style='min-width:185px;'>
|
<tr><td width='1%' nowrap='nowrap'>$Lang::tr{'fwhost cust service'}</td><td><select name='CUST_SRV' style='min-width:185px;'>
|
||||||
END
|
END
|
||||||
&General::readhasharray("$configsrv", \%customservice);
|
&General::readhasharray("$configsrv", \%customservice);
|
||||||
foreach my $key (sort {$a <=> $b} keys %customservice)
|
foreach my $key (sort { uc($customservice{$a}[0]) cmp uc($customservice{$b}[0])|| $a <=> $b } keys %customservice)
|
||||||
{
|
{
|
||||||
print "<option>$customservice{$key}[0]</option>";
|
print "<option>$customservice{$key}[0]</option>";
|
||||||
}
|
}
|
||||||
@@ -1358,7 +1357,7 @@ END
|
|||||||
else{ print" <tr bgcolor='$color{'color20'}'>";}
|
else{ print" <tr bgcolor='$color{'color20'}'>";}
|
||||||
my ($ip,$sub)=split(/\//,$customhost{$key}[2]);
|
my ($ip,$sub)=split(/\//,$customhost{$key}[2]);
|
||||||
print<<END;
|
print<<END;
|
||||||
<td width='40%'><form method='post'>$customhost{$key}[0]</td><td width='50%'>$customhost{$key}[2]</td><td align='center'>$customhost{$key}[3]x</td>
|
<td width='40%'><form method='post'>$customhost{$key}[0]</td><td width='50%'>$ip</td><td align='center'>$customhost{$key}[3]x</td>
|
||||||
<td width='1%'><input type='image' src='/images/edit.gif' align='middle' alt=$Lang::tr{'edit'} title=$Lang::tr{'edit'} />
|
<td width='1%'><input type='image' src='/images/edit.gif' align='middle' alt=$Lang::tr{'edit'} title=$Lang::tr{'edit'} />
|
||||||
<input type='hidden' name='ACTION' value='edithost' />
|
<input type='hidden' name='ACTION' value='edithost' />
|
||||||
<input type='hidden' name='HOSTNAME' value='$customhost{$key}[0]' />
|
<input type='hidden' name='HOSTNAME' value='$customhost{$key}[0]' />
|
||||||
@@ -1748,9 +1747,10 @@ sub plausicheck
|
|||||||
&General::readhasharray("$confighost", \%customhost);
|
&General::readhasharray("$confighost", \%customhost);
|
||||||
if (!&checkname(\%customhost))
|
if (!&checkname(\%customhost))
|
||||||
{
|
{
|
||||||
$errormessage=$errormessage."<br>".$Lang::tr{'fwhost err hostexist'};
|
$errormessage.="<br>".$Lang::tr{'fwhost err hostexist'};
|
||||||
$fwhostsettings{'HOSTNAME'} = $fwhostsettings{'orgname'};
|
$fwhostsettings{'HOSTNAME'} = $fwhostsettings{'orgname'};
|
||||||
if ($fwhostsettings{'update'} eq 'on'){$fwhostsettings{'ACTION'}=$edit;}
|
#if ($fwhostsettings{'update'} eq 'on'){$fwhostsettings{'ACTION'}=$edit;}
|
||||||
|
$fwhostsettings{'ACTION'}=$edit;
|
||||||
}
|
}
|
||||||
#check if host with this ip already exists
|
#check if host with this ip already exists
|
||||||
if (!&checkip(\%customhost,2))
|
if (!&checkip(\%customhost,2))
|
||||||
|
|||||||
Reference in New Issue
Block a user