summaryrefslogtreecommitdiffstats
path: root/whineatnews.pl
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-02-20 16:53:16 +0100
committermkanat%kerio.com <>2005-02-20 16:53:16 +0100
commite547dd6d7b7b9a3c2135c56dd6b7a433743fd4b1 (patch)
tree179cd1f21b8e26b2cf2feec6ebfe30ddbd33afdd /whineatnews.pl
parent335b8c125f821a96ddfd769163c92c1d74ce62f6 (diff)
downloadbugzilla-e547dd6d7b7b9a3c2135c56dd6b7a433743fd4b1.tar.gz
bugzilla-e547dd6d7b7b9a3c2135c56dd6b7a433743fd4b1.tar.xz
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-xwhineatnews.pl10
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;