]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - html/cgi-bin/fwhosts.cgi
Forward Firewall: added "apply" button to groupmanagement. Now the user can make...
[people/teissler/ipfire-2.x.git] / html / cgi-bin / fwhosts.cgi
index 1ace2692e5c5df3f0bcac0d6c9a6d53713bcf10e..636cf65e43b02c7878de1bdb9e585c6c03d60639 100755 (executable)
@@ -80,6 +80,11 @@ unless (-e $configsrvgrp) { system("touch $configsrvgrp"); }
 &Header::openbigbox('100%', 'center');
 
 ## ACTION ####
+if ($fwhostsettings{'ACTION'} eq $Lang::tr{'fwdfw reread'})
+{
+       &reread_rules;
+       &showmenu;
+}
 # Update
 if ($fwhostsettings{'ACTION'} eq 'updatenet' )
 {
@@ -1003,9 +1008,15 @@ sub showmenu
        <table border='0' width='100%'><form method='post'>
        <tr><td><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newnet'}' /><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newhost'}' /><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newgrp'}' /></td>
        <td align='right'><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newservice'}' /><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newservicegrp'}' /></td></tr>
-       <tr><td colspan='6'><hr></hr></td></tr></table></form>
+       <tr><td colspan='6'><hr></hr></td>
 END
        
+               
+       if (-f "${General::swroot}/fwhosts/reread"){
+               print "</tr><tr><td colspan='6'><input type='submit' name='ACTION' value='$Lang::tr{'fwdfw reread'}'>$Lang::tr{'fwhost reread'}</td>";
+       }
+               print"</tr></table></form>";    
+
        &Header::closebox();
        
 }
@@ -1400,7 +1411,7 @@ sub viewtablegrp
        my $count=1;
        my $grpname;
        my $remark;
-       my $number=1;
+       my $number;
        if (!keys %customgrp) 
        { 
                print "<center><b>$Lang::tr{'fwhost empty'}</b>"; 
@@ -1446,6 +1457,7 @@ sub viewtablegrp
                        print"<input type='hidden' name='ACTION' value='deletegrphost'><input type='hidden' name='delhost' value='$grpname,$remark,$customgrp{$key}[2],$customgrp{$key}[3]'></form></td></tr>";
                        
                        $helper=$customgrp{$key}[0];
+                       $number++;
                }
                print"</table>";
                
@@ -1875,10 +1887,20 @@ sub getipforgroup
        }
 }
 sub rules
+{
+       if (!-f "${General::swroot}/fwhosts/reread"){
+               system("touch ${General::swroot}/fwhosts/reread");
+       }
+}
+sub reread_rules
 {
        system ("/usr/local/bin/forwardfwctrl");
-       system("rm ${General::swroot}/forward/reread");
+       if ( -f "${General::swroot}/fwhosts/reread"){
+               system("rm ${General::swroot}/fwhosts/reread");
+       }
+       
 }
+
 sub decrease
 {
        my $grp=$_[0];