Commit 31edd119 authored by bugzilla%glob.com.au's avatar bugzilla%glob.com.au

Bug 282510: Argument "" isn't numeric when modifying group

Patch by Byron Jones <bugzilla@glob.com.au> r,a=justdave
parent b9402d3e
...@@ -599,7 +599,7 @@ sub doGroupChanges { ...@@ -599,7 +599,7 @@ sub doGroupChanges {
$b =~ /^oldgrp-(\d+)$/; $b =~ /^oldgrp-(\d+)$/;
my $v = $1; my $v = $1;
my $grp = $cgi->param("grp-$v") || 0; my $grp = $cgi->param("grp-$v") || 0;
if (($cgi->param("oldgrp-$v") != $grp) && ($v != $gid)) { if (($v != $gid) && ($cgi->param("oldgrp-$v") != $grp)) {
$chgs = 1; $chgs = 1;
if ($grp != 0) { if ($grp != 0) {
SendSQL("INSERT INTO group_group_map SendSQL("INSERT INTO group_group_map
...@@ -613,7 +613,8 @@ sub doGroupChanges { ...@@ -613,7 +613,8 @@ sub doGroupChanges {
} }
my $bless = $cgi->param("bless-$v") || 0; my $bless = $cgi->param("bless-$v") || 0;
if ($cgi->param("oldbless-$v") != $bless) { my $oldbless = $cgi->param("oldbless-$v");
if ((defined $oldbless) and ($oldbless != $bless)) {
$chgs = 1; $chgs = 1;
if ($bless != 0) { if ($bless != 0) {
SendSQL("INSERT INTO group_group_map SendSQL("INSERT INTO group_group_map
......
...@@ -154,9 +154,10 @@ ...@@ -154,9 +154,10 @@
</td> </td>
[% ELSE %] [% ELSE %]
<td> <td>
<input type="hidden" name="oldbless-[% group.grpid FILTER html %]" value="0">
</td> </td>
<td> <td>
<input type="hidden" name="oldgrp-[% group.grpid FILTER html %]" value=""> <input type="hidden" name="oldgrp-[% group.grpid FILTER html %]" value="0">
</td> </td>
[% END %] [% END %]
<td align="left" class="groupname"> <td align="left" class="groupname">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment