summaryrefslogtreecommitdiffstats
path: root/Bugzilla/BugMail.pm
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-03-12 04:45:01 +0100
committermkanat%kerio.com <>2005-03-12 04:45:01 +0100
commit4910b3f9485a928091d98e5da83b16cebae33eed (patch)
tree86285755c4d1fdcd4b7fef7a4d2e0caacf11bc20 /Bugzilla/BugMail.pm
parentaf17bfb29507e2fd93aca4e6f602c527b0e05bd2 (diff)
downloadbugzilla-4910b3f9485a928091d98e5da83b16cebae33eed.tar.gz
bugzilla-4910b3f9485a928091d98e5da83b16cebae33eed.tar.xz
Bug 285692: lastdiffed should use NULL instead of the "beginning of time"
Patch By Max Kanat-Alexander <mkanat@kerio.com> r=glob, a=myk
Diffstat (limited to 'Bugzilla/BugMail.pm')
-rw-r--r--Bugzilla/BugMail.pm15
1 files changed, 6 insertions, 9 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm
index 1221dcfbc..ba7c641df 100644
--- a/Bugzilla/BugMail.pm
+++ b/Bugzilla/BugMail.pm
@@ -172,9 +172,6 @@ sub ProcessOneBug($) {
$values{component} = get_component_name($values{component_id});
my ($start, $end) = (@row);
- # $start and $end are considered safe because users can't touch them
- trick_taint($start);
- trick_taint($end);
my $cc_ref = Bugzilla->dbh->selectcol_arrayref(
q{SELECT profiles.login_name FROM cc, profiles
@@ -220,15 +217,16 @@ sub ProcessOneBug($) {
my @diffs;
-
+ # If lastdiffed is NULL, then we don't limit the search on time.
+ my $when_restriction = $start ?
+ " AND bug_when > '$start' AND bug_when <= '$end'" : '';
SendSQL("SELECT profiles.login_name, fielddefs.description, " .
" bug_when, removed, added, attach_id, fielddefs.name " .
"FROM bugs_activity, fielddefs, profiles " .
"WHERE bug_id = $id " .
" AND fielddefs.fieldid = bugs_activity.fieldid " .
" AND profiles.userid = who " .
- " AND bug_when > '$start' " .
- " AND bug_when <= '$end' " .
+ $when_restriction .
"ORDER BY bug_when"
);
@@ -280,8 +278,7 @@ sub ProcessOneBug($) {
" AND fielddefs.fieldid = bugs_activity.fieldid" .
" AND (fielddefs.name = 'bug_status' " .
" OR fielddefs.name = 'resolution') " .
- " AND bug_when > '$start' " .
- " AND bug_when <= '$end' " .
+ $when_restriction .
"ORDER BY bug_when, bug_id");
my $thisdiff = "";
@@ -829,7 +826,7 @@ sub NewProcessOnePerson ($$$$$$$$$$$$$) {
}
}
- my $isnew = ($start !~ m/[1-9]/);
+ my $isnew = !$start;
my %substs;