diff options
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; |