From 80e765fbe8bf23ba27b5484bdb3a65c7aa723d6f Mon Sep 17 00:00:00 2001 From: "travis%sedsystems.ca" <> Date: Wed, 2 Feb 2005 01:43:26 +0000 Subject: Bug 279740 : Move CountOpenDependencies out of globals.pl Patch by Max Kanat-Alexander r=wurblzap a=justdave --- globals.pl | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'globals.pl') diff --git a/globals.pl b/globals.pl index 1529a0f6a..b48963412 100644 --- a/globals.pl +++ b/globals.pl @@ -999,38 +999,6 @@ sub GetBugLink { } } -# CountOpenDependencies counts the number of open dependent bugs for a -# list of bugs and returns a list of bug_id's and their dependency count -# It takes one parameter: -# - A list of bug numbers whose dependencies are to be checked - -sub CountOpenDependencies { - my (@bug_list) = @_; - my @dependencies; - - # Make sure any unfetched data from a currently running query - # is saved off rather than overwritten - PushGlobalSQLState(); - - SendSQL("SELECT blocked, count(bug_status) " . - "FROM bugs, dependencies " . - "WHERE blocked IN (" . (join "," , @bug_list) . ") " . - "AND bug_id = dependson " . - "AND bug_status IN ('" . (join "','", OpenStates()) . "') " . - "GROUP BY blocked "); - - while (MoreSQLData()) { - my ($bug_id, $dependencies) = FetchSQLData(); - push(@dependencies, { bug_id => $bug_id, - dependencies => $dependencies }); - } - - # All done with this sidetrip - PopGlobalSQLState(); - - return @dependencies; -} - sub GetLongDescriptionAsText { my ($id, $start, $end) = (@_); my $result = ""; -- cgit v1.2.3-24-g4f1b