summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-01-09 08:49:36 +0100
committermkanat%bugzilla.org <>2009-01-09 08:49:36 +0100
commit4e1a9ffcb681951b2138e0781062d1d559bc8af2 (patch)
tree2b1348a57514256e893f220b9b49e207dda67f4d /Bugzilla/Bug.pm
parent9b0a78fbcc3a3c5763e216da6dda8420379701a9 (diff)
downloadbugzilla-4e1a9ffcb681951b2138e0781062d1d559bc8af2.tar.gz
bugzilla-4e1a9ffcb681951b2138e0781062d1d559bc8af2.tar.xz
Bug 472556: Modify Bug.comments to allow getting comments only comments that have been added since a certain time
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r--Bugzilla/Bug.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index cfc01ba7b..d941a766e 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -2853,11 +2853,16 @@ sub GetComments {
INNER JOIN profiles
ON profiles.userid = longdescs.who
WHERE longdescs.bug_id = ?';
+
if ($start) {
- $query .= ' AND longdescs.bug_when > ?
- AND longdescs.bug_when <= ?';
- push(@args, ($start, $end));
+ $query .= ' AND longdescs.bug_when > ?';
+ push(@args, $start);
+ }
+ if ($end) {
+ $query .= ' AND longdescs.bug_when <= ?';
+ push(@args, $end);
}
+
$query .= " ORDER BY longdescs.bug_when $sort_order";
my $sth = $dbh->prepare($query);
$sth->execute(@args);