Commit 88a69f20 authored by ghendricks%novell.com's avatar ghendricks%novell.com

Bug 283609 - Search for relative dates in deadline

patch by ghendricks@novell.com r=LpSolit, a=LpSolit
parent a8ae1c34
......@@ -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";
......
......@@ -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 %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment