]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Forward Firewall: Fixes Problem when editing a host and afterwards pressing F5, a...
authorAlexander Marx <amarx@ipfire.org>
Fri, 8 Feb 2013 07:07:45 +0000 (08:07 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 9 Aug 2013 12:08:18 +0000 (14:08 +0200)
html/cgi-bin/fwhosts.cgi

index 6ce7ac8df2e635e4e60cdfa6212c18b1b94ae8ba..fb39ed86c2249af52b4afcbc5f2737906aaf444d 100755 (executable)
@@ -108,7 +108,6 @@ if ($fwhostsettings{'ACTION'} eq 'updatehost')
        {
                if($customhost{$key}[0] eq $fwhostsettings{'orgname'})
                {
-                       $fwhostsettings{'orgname'} = $customhost{$key}[0];
                        if ($customhost{$key}[1] eq 'ip'){
                                ($ip,$subnet) = split (/\//,$customhost{$key}[2]);
                        }else{
@@ -117,11 +116,15 @@ if ($fwhostsettings{'ACTION'} eq 'updatehost')
                        $fwhostsettings{'orgip'} = $ip;
                        $fwhostsettings{'count'} = $customhost{$key}[3];
                        delete $customhost{$key};
+                       &General::writehasharray("$confighost", \%customhost);
                }
        }
-       &General::writehasharray("$confighost", \%customhost);
        $fwhostsettings{'actualize'} = 'on';
+       if($fwhostsettings{'orgip'}){
        $fwhostsettings{'ACTION'} = 'savehost';
+       }else{
+               $fwhostsettings{'ACTION'} = $Lang::tr{'fwhost newhost'};
+       }
 }
 if ($fwhostsettings{'ACTION'} eq 'updateservice')
 {