summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-11-28 02:48:56 +0100
committerlpsolit%gmail.com <>2006-11-28 02:48:56 +0100
commit58e6f3b917ac29d28cf087c22911eb07dd54181b (patch)
tree7b6f0d1f9983ad938c7944bf36787006b305889d /Bugzilla
parent906283e027be962ec042ff602639de564aae62e6 (diff)
downloadbugzilla-58e6f3b917ac29d28cf087c22911eb07dd54181b.tar.gz
bugzilla-58e6f3b917ac29d28cf087c22911eb07dd54181b.tar.xz
Bug 361870: SQL query in Bugzilla::Bug::EmitDependList() too complicated - Patch by Frédéric Buclin <LpSolit@gmail.com> r=bkor a=justdave
Diffstat (limited to 'Bugzilla')
-rwxr-xr-xBugzilla/Bug.pm15
1 files changed, 6 insertions, 9 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 5e8392d9f..f09386a0c 100755
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -1363,18 +1363,15 @@ sub editable_bug_fields {
return sort(@fields);
}
-# This method is private and is not to be used outside of the Bug class.
+# XXX - When Bug::update() will be implemented, we should make this routine
+# a private method.
sub EmitDependList {
my ($myfield, $targetfield, $bug_id) = (@_);
my $dbh = Bugzilla->dbh;
- my $list_ref =
- $dbh->selectcol_arrayref(
- "SELECT dependencies.$targetfield
- FROM dependencies, bugs
- WHERE dependencies.$myfield = ?
- AND bugs.bug_id = dependencies.$targetfield
- ORDER BY dependencies.$targetfield",
- undef, ($bug_id));
+ my $list_ref = $dbh->selectcol_arrayref(
+ "SELECT $targetfield FROM dependencies
+ WHERE $myfield = ? ORDER BY $targetfield",
+ undef, $bug_id);
return $list_ref;
}