diff options
author | mkanat%kerio.com <> | 2005-02-20 15:53:16 +0000 |
---|---|---|
committer | mkanat%kerio.com <> | 2005-02-20 15:53:16 +0000 |
commit | e547dd6d7b7b9a3c2135c56dd6b7a433743fd4b1 (patch) | |
tree | 179cd1f21b8e26b2cf2feec6ebfe30ddbd33afdd /whineatnews.pl | |
parent | Bug 282728: Add a switch to checksetup to skip compiling the templates (diff) | |
download | bugzilla-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 'whineatnews.pl')
-rwxr-xr-x | whineatnews.pl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/whineatnews.pl b/whineatnews.pl index 8e73e1b6d..d90e775fa 100755 --- a/whineatnews.pl +++ b/whineatnews.pl @@ -33,10 +33,12 @@ require "globals.pl"; use Bugzilla::BugMail; -SendSQL("select bug_id,short_desc,login_name from bugs,profiles where " . - "(bug_status = 'NEW' or bug_status = 'REOPENED') and " . - "to_days(now()) - to_days(delta_ts) > " . Param('whinedays') . - " and userid=assigned_to order by bug_id"); +my $dbh = Bugzilla->dbh; +SendSQL("SELECT bug_id, short_desc, login_name FROM bugs, profiles WHERE " . + "(bug_status = 'NEW' OR bug_status = 'REOPENED') AND " . + $dbh->sql_to_days('NOW()') . " - " . + $dbh->sql_to_days('delta_ts') . " > " . Param('whinedays') . + " AND userid = assigned_to ORDER BY bug_id"); my %bugs; my %desc; |