aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-02-20 15:53:16 +0000
committermkanat%kerio.com <>2005-02-20 15:53:16 +0000
commite547dd6d7b7b9a3c2135c56dd6b7a433743fd4b1 (patch)
tree179cd1f21b8e26b2cf2feec6ebfe30ddbd33afdd /collectstats.pl
parentBug 282728: Add a switch to checksetup to skip compiling the templates (diff)
downloadbugzilla-e547dd6d7b7b9a3c2135c56dd6b7a433743fd4b1.tar.gz
bugzilla-e547dd6d7b7b9a3c2135c56dd6b7a433743fd4b1.tar.bz2
bugzilla-e547dd6d7b7b9a3c2135c56dd6b7a433743fd4b1.zip
Bug 280499: Replace "TO_DAYS()" with Bugzilla::DB function call
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=mkanat, a=justdave
Diffstat (limited to 'collectstats.pl')
-rwxr-xr-xcollectstats.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/collectstats.pl b/collectstats.pl
index cf863f405..ae44b0b75 100755
--- a/collectstats.pl
+++ b/collectstats.pl
@@ -283,10 +283,11 @@ sub regenerate_stats {
# Determine the start date from the date the first bug in the
# database was created, and the end date from the current day.
# If there were no bugs in the search, return early.
- SendSQL("SELECT to_days(creation_ts) AS start, " .
- "to_days(current_date) AS end, " .
- "to_days('1970-01-01') " .
- "FROM bugs $from_product WHERE to_days(creation_ts) != 'NULL' " .
+ SendSQL("SELECT " . $dbh->sql_to_days('creation_ts') . " AS start, " .
+ $dbh->sql_to_days('current_date') . " AS end, " .
+ $dbh->sql_to_days("'1970-01-01'") .
+ " FROM bugs $from_product WHERE " .
+ $dbh->sql_to_days('creation_ts') . " != 'NULL' " .
$and_product .
"ORDER BY start " . $dbh->sql_limit(1));