mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
Handle mismatched comment types properly
This commit is contained in:
@@ -33,3 +33,5 @@ Removed invalid "Above" options for packet flow rate.
|
||||
---- Changes since 1.500 ----
|
||||
Added a button to move rules to another chain.
|
||||
Added a button to rename an existing custom chain.
|
||||
---- Changes since 1.510 ----
|
||||
Better handle the case where a rule has a --comment format description, but # format comments are enabled.
|
||||
|
||||
@@ -38,7 +38,7 @@ print "<td>",$text{"index_chain_".lc($rule->{'chain'})} ||
|
||||
&text('index_chain', "<tt>$rule->{'chain'}</tt>"),"</td> </tr>\n";
|
||||
|
||||
print "<tr> <td><b>$text{'edit_cmt'}</b></td>\n";
|
||||
if ($config{'comment_mod'}) {
|
||||
if ($config{'comment_mod'} || $rule->{'comment'}) {
|
||||
# Get comment from --comment option
|
||||
printf "<td><input name=cmt size=50 value='%s'></td> </tr>\n",
|
||||
&html_escape($rule->{'comment'}->[1]);
|
||||
|
||||
@@ -40,6 +40,8 @@ else {
|
||||
}
|
||||
else {
|
||||
$rule->{'cmt'} = $in{'cmt'};
|
||||
delete($rule->{'comment'});
|
||||
@mods = grep { $_ ne "comment" } @mods;
|
||||
}
|
||||
if ($in{'jump'} eq '*') {
|
||||
$in{'other'} =~ /^\S+$/ || &error($text{'save_echain'});
|
||||
|
||||
Reference in New Issue
Block a user