summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Search.pm2
-rw-r--r--Bugzilla/Token.pm3
2 files changed, 3 insertions, 2 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index 82cbb9aa6..a1058fbe5 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -906,7 +906,7 @@ sub init {
$unitinterval = 'YEAR';
}
my $cutoff = "DATE_SUB(NOW(), " .
- "INTERVAL $quantity $unitinterval)";
+ $dbh->sql_interval("$quantity $unitinterval");
my $assigned_fieldid = &::GetFieldID('assigned_to');
push(@supptables, "LEFT JOIN longdescs comment_$table " .
"ON comment_$table.who = bugs.assigned_to " .
diff --git a/Bugzilla/Token.pm b/Bugzilla/Token.pm
index 4c70d4bad..73f074185 100644
--- a/Bugzilla/Token.pm
+++ b/Bugzilla/Token.pm
@@ -119,7 +119,8 @@ sub IssuePasswordToken {
LEFT JOIN tokens
ON tokens.userid = profiles.userid
AND tokens.tokentype = 'password'
- AND tokens.issuedate > DATE_SUB(NOW(), INTERVAL 10 MINUTE)
+ AND tokens.issuedate > DATE_SUB(NOW(), " .
+ $dbh->sql_interval('10 MINUTE') . ")
WHERE login_name = $quotedloginname");
my ($userid, $toosoon) = &::FetchSQLData();