From 4910b3f9485a928091d98e5da83b16cebae33eed Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Sat, 12 Mar 2005 03:45:01 +0000 Subject: Bug 285692: lastdiffed should use NULL instead of the "beginning of time" Patch By Max Kanat-Alexander r=glob, a=myk --- globals.pl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'globals.pl') diff --git a/globals.pl b/globals.pl index b0a8feca8..6e0ebd774 100644 --- a/globals.pl +++ b/globals.pl @@ -924,15 +924,16 @@ sub GetLongDescriptionAsText { "WHERE profiles.userid = longdescs.who " . "AND longdescs.bug_id = $id "); - if ($start && $start =~ /[1-9]/) { - # If $start is not all zeros, obtain the count-index + # $start will be undef for New bugs, and defined for pre-existing bugs. + if ($start) { + # If $start is not NULL, obtain the count-index # of this comment for the leading "Comment #xxx" line.) - $query .= "AND longdescs.bug_when > '$start'"; - SendSQL("SELECT count(*) FROM longdescs WHERE bug_id = $id AND bug_when <= '$start'"); + SendSQL("SELECT count(*) FROM longdescs " . + " WHERE bug_id = $id AND bug_when <= '$start'"); ($count) = (FetchSQLData()); - } - if ($end) { - $query .= "AND longdescs.bug_when <= '$end'"; + + $query .= " AND longdescs.bug_when > '$start'" + . " AND longdescs.bug_when <= '$end' "; } $query .= "ORDER BY longdescs.bug_when"; -- cgit v1.2.3-24-g4f1b