diff options
author | bugzilla%glob.com.au <> | 2005-02-19 00:38:42 +0000 |
---|---|---|
committer | bugzilla%glob.com.au <> | 2005-02-19 00:38:42 +0000 |
commit | 31edd11972e360a0773ee071c9b4666c51edfcef (patch) | |
tree | b5babdfc3bec4a335ac09de19b5e5e106cce0adc | |
parent | Bug 280497: Replace "LIMIT" with Bugzilla::DB function call (diff) | |
download | bugzilla-31edd11972e360a0773ee071c9b4666c51edfcef.tar.gz bugzilla-31edd11972e360a0773ee071c9b4666c51edfcef.tar.bz2 bugzilla-31edd11972e360a0773ee071c9b4666c51edfcef.zip |
Bug 282510: Argument "" isn't numeric when modifying group
Patch by Byron Jones <bugzilla@glob.com.au> r,a=justdave
-rwxr-xr-x | editgroups.cgi | 5 | ||||
-rw-r--r-- | template/en/default/admin/groups/edit.html.tmpl | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/editgroups.cgi b/editgroups.cgi index 02f24b1e4..f7362cb5f 100755 --- a/editgroups.cgi +++ b/editgroups.cgi @@ -599,7 +599,7 @@ sub doGroupChanges { $b =~ /^oldgrp-(\d+)$/; my $v = $1; 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; if ($grp != 0) { SendSQL("INSERT INTO group_group_map @@ -613,7 +613,8 @@ sub doGroupChanges { } 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; if ($bless != 0) { SendSQL("INSERT INTO group_group_map diff --git a/template/en/default/admin/groups/edit.html.tmpl b/template/en/default/admin/groups/edit.html.tmpl index 92b8e9c2e..610d3102e 100644 --- a/template/en/default/admin/groups/edit.html.tmpl +++ b/template/en/default/admin/groups/edit.html.tmpl @@ -154,9 +154,10 @@ </td> [% ELSE %] <td> + <input type="hidden" name="oldbless-[% group.grpid FILTER html %]" value="0"> </td> <td> - <input type="hidden" name="oldgrp-[% group.grpid FILTER html %]" value=""> + <input type="hidden" name="oldgrp-[% group.grpid FILTER html %]" value="0"> </td> [% END %] <td align="left" class="groupname"> |