From c912888237c96e5de3c0e73e68cac1dfddb2f556 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 9 Aug 2006 04:55:46 +0000 Subject: Bug 347269: Deleting a user account displays incoherent comments - Patch by Frédéric Buclin r=wurblzap a=justdave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- editusers.cgi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'editusers.cgi') 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; -- cgit v1.2.3-24-g4f1b