diff options
author | lpsolit%gmail.com <> | 2006-08-09 06:55:46 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-08-09 06:55:46 +0200 |
commit | c912888237c96e5de3c0e73e68cac1dfddb2f556 (patch) | |
tree | 5d9ec4ca71c50b2d48929344d23da78b4063f28c /editusers.cgi | |
parent | 3bf04a6f9d450b7fabc79ba9ca1d8d5332942adb (diff) | |
download | bugzilla-c912888237c96e5de3c0e73e68cac1dfddb2f556.tar.gz bugzilla-c912888237c96e5de3c0e73e68cac1dfddb2f556.tar.xz |
Bug 347269: Deleting a user account displays incoherent comments - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wurblzap a=justdave
Diffstat (limited to 'editusers.cgi')
-rwxr-xr-x | editusers.cgi | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editusers.cgi b/editusers.cgi index e9e40eb4c..e53341c61 100755 --- a/editusers.cgi +++ b/editusers.cgi @@ -468,14 +468,14 @@ if ($action eq 'search') { $vars->{'longdescs'} = $dbh->selectrow_array( 'SELECT COUNT(*) FROM longdescs WHERE who = ?', undef, $otherUserID); - $vars->{'namedqueries'} = $dbh->selectcol_arrayref( + my $namedquery_ids = $dbh->selectcol_arrayref( 'SELECT id FROM namedqueries WHERE userid = ?', - undef, - $otherUserID); - if (@{$vars->{'namedqueries'}}) { + undef, $otherUserID); + $vars->{'namedqueries'} = scalar(@$namedquery_ids); + if (scalar(@$namedquery_ids)) { $vars->{'namedquery_group_map'} = $dbh->selectrow_array( 'SELECT COUNT(*) FROM namedquery_group_map WHERE namedquery_id IN' . - ' (' . join(', ', @{$vars->{'namedqueries'}}) . ')'); + ' (' . join(', ', @$namedquery_ids) . ')'); } else { $vars->{'namedquery_group_map'} = 0; |