diff options
-rw-r--r-- | Bugzilla/Search.pm | 12 | ||||
-rw-r--r-- | template/en/default/search/form.html.tmpl | 2 |
2 files changed, 5 insertions, 9 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"; diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl index c7990fd24..a237fd347 100644 --- a/template/en/default/search/form.html.tmpl +++ b/template/en/default/search/form.html.tmpl @@ -317,7 +317,7 @@ function doOnSelectProduct(selectmode) { value="[% default.deadlineto.0 FILTER html %]"> </td> <td> - <small>(YYYY-MM-DD)</small> + <small>(YYYY-MM-DD or relative dates)</small> </td> </tr> [% END %] |