From 8132a036b5b358dc1377b21eaf82246c35b4ea5f Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 22 Nov 2008 03:53:13 +0000 Subject: Bug 453681: Do not display the "Yes, delete" button if deleting a user account would cause FK constraint errors - Patch by Frédéric Buclin r=wurblzap a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- editusers.cgi | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'editusers.cgi') diff --git a/editusers.cgi b/editusers.cgi index ea477a372..23adb6eb7 100755 --- a/editusers.cgi +++ b/editusers.cgi @@ -358,6 +358,9 @@ if ($action eq 'search') { $vars->{'otheruser'} = $otherUser; # Find other cross references. + $vars->{'attachments'} = $dbh->selectrow_array( + 'SELECT COUNT(*) FROM attachments WHERE submitter_id = ?', + undef, $otherUserID); $vars->{'assignee_or_qa'} = $dbh->selectrow_array( qq{SELECT COUNT(*) FROM bugs @@ -372,6 +375,9 @@ if ($action eq 'search') { $vars->{'bugs_activity'} = $dbh->selectrow_array( 'SELECT COUNT(*) FROM bugs_activity WHERE who = ?', undef, $otherUserID); + $vars->{'component_cc'} = $dbh->selectrow_array( + 'SELECT COUNT(*) FROM component_cc WHERE user_id = ?', + undef, $otherUserID); $vars->{'email_setting'} = $dbh->selectrow_array( 'SELECT COUNT(*) FROM email_setting WHERE user_id = ?', undef, $otherUserID); @@ -402,6 +408,9 @@ if ($action eq 'search') { $vars->{'profiles_activity'} = $dbh->selectrow_array( 'SELECT COUNT(*) FROM profiles_activity WHERE who = ? AND userid != ?', undef, ($otherUserID, $otherUserID)); + $vars->{'quips'} = $dbh->selectrow_array( + 'SELECT COUNT(*) FROM quips WHERE userid = ?', + undef, $otherUserID); $vars->{'series'} = $dbh->selectrow_array( 'SELECT COUNT(*) FROM series WHERE creator = ?', undef, $otherUserID); -- cgit v1.2.3-24-g4f1b