summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorghendricks%novell.com <>2009-11-09 21:54:50 +0100
committerghendricks%novell.com <>2009-11-09 21:54:50 +0100
commit88a69f2048d03b845e8e04fd23b1141df9fb8ee1 (patch)
tree998673928eb17337d32159134df8077cd4ac65a9 /Bugzilla
parenta8ae1c3475cbc1109aeacf4ebeceb5c0d5089211 (diff)
downloadbugzilla-88a69f2048d03b845e8e04fd23b1141df9fb8ee1.tar.gz
bugzilla-88a69f2048d03b845e8e04fd23b1141df9fb8ee1.tar.xz
Bug 283609 - Search for relative dates in deadline
patch by ghendricks@novell.com r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Search.pm12
1 files changed, 4 insertions, 8 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index fa18a0e78..4aaf7e14c 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -533,10 +533,8 @@ sub init {
my $deadlineto;
if ($params->param('deadlinefrom')){
- $deadlinefrom = $params->param('deadlinefrom');
- validate_date($deadlinefrom)
- || ThrowUserError('illegal_date', {date => $deadlinefrom,
- format => 'YYYY-MM-DD'});
+ $params->param('deadlinefrom', '') if lc($params->param('deadlinefrom')) eq 'now';
+ $deadlinefrom = SqlifyDate($params->param('deadlinefrom'));
$sql_deadlinefrom = $dbh->quote($deadlinefrom);
trick_taint($sql_deadlinefrom);
my $term = "bugs.deadline >= $sql_deadlinefrom";
@@ -548,10 +546,8 @@ sub init {
}
if ($params->param('deadlineto')){
- $deadlineto = $params->param('deadlineto');
- validate_date($deadlineto)
- || ThrowUserError('illegal_date', {date => $deadlineto,
- format => 'YYYY-MM-DD'});
+ $params->param('deadlineto', '') if lc($params->param('deadlineto')) eq 'now';
+ $deadlineto = SqlifyDate($params->param('deadlineto'));
$sql_deadlineto = $dbh->quote($deadlineto);
trick_taint($sql_deadlineto);
my $term = "bugs.deadline <= $sql_deadlineto";