summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-03-03 16:19:09 +0100
committermkanat%kerio.com <>2005-03-03 16:19:09 +0100
commit7cb62ca9a2742e10334cba6bf965a5c0d8ad40ba (patch)
treee509aee1bc024c0d486e557cd3f7a2e9750f45e8 /Bugzilla
parent0e8f16e1c64b07cf6d90264f8f754307d340b30e (diff)
downloadbugzilla-7cb62ca9a2742e10334cba6bf965a5c0d8ad40ba.tar.gz
bugzilla-7cb62ca9a2742e10334cba6bf965a5c0d8ad40ba.tar.xz
Bug: 284244: DATE_SUB and DATE_ADD are not ANSI SQL
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=wicked, a=justdave
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Search.pm2
-rw-r--r--Bugzilla/Token.pm4
2 files changed, 3 insertions, 3 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index f2e630784..1a0cb9a7f 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -922,7 +922,7 @@ sub init {
} elsif ($unit eq 'y') {
$unitinterval = 'YEAR';
}
- my $cutoff = "DATE_SUB(NOW(), " .
+ my $cutoff = "NOW() - " .
$dbh->sql_interval("$quantity $unitinterval");
my $assigned_fieldid = &::GetFieldID('assigned_to');
push(@supptables, "LEFT JOIN longdescs comment_$table " .
diff --git a/Bugzilla/Token.pm b/Bugzilla/Token.pm
index 73f074185..feca00c3b 100644
--- a/Bugzilla/Token.pm
+++ b/Bugzilla/Token.pm
@@ -119,8 +119,8 @@ sub IssuePasswordToken {
LEFT JOIN tokens
ON tokens.userid = profiles.userid
AND tokens.tokentype = 'password'
- AND tokens.issuedate > DATE_SUB(NOW(), " .
- $dbh->sql_interval('10 MINUTE') . ")
+ AND tokens.issuedate > NOW() - " .
+ $dbh->sql_interval('10 MINUTE') . "
WHERE login_name = $quotedloginname");
my ($userid, $toosoon) = &::FetchSQLData();