Lines 356-364
elsif ( $phase eq 'Choose these criteria' ) {
Link Here
|
356 |
my $tovalue = $input->param( "to_" . $crit . "_value" ); |
356 |
my $tovalue = $input->param( "to_" . $crit . "_value" ); |
357 |
|
357 |
|
358 |
# If the range values are dates |
358 |
# If the range values are dates |
359 |
if ($fromvalue =~ C4::Dates->regexp('syspref') && $tovalue =~ C4::Dates->regexp('syspref')) { |
359 |
my $fromvalue_dt; |
360 |
$fromvalue = C4::Dates->new($fromvalue)->output("iso"); |
360 |
$fromvalue_dt = eval { dt_from_string( $fromvalue ); } if ( $fromvalue ); |
361 |
$tovalue = C4::Dates->new($tovalue)->output("iso"); |
361 |
my $tovalue_dt; |
|
|
362 |
$tovalue_dt = eval { dt_from_string( $tovalue ); } if ($tovalue); |
363 |
if ( $fromvalue_dt && $tovalue_dt ) { |
364 |
$fromvalue = output_pref( { dt => dt_from_string( $fromvalue_dt ), dateonly => 1, dateformat => 'iso' } ); |
365 |
$tovalue = output_pref( { dt => dt_from_string( $tovalue_dt ), dateonly => 1, dateformat => 'iso' } ); |
362 |
} |
366 |
} |
363 |
|
367 |
|
364 |
if ($fromvalue && $tovalue) { |
368 |
if ($fromvalue && $tovalue) { |
Lines 368-375
elsif ( $phase eq 'Choose these criteria' ) {
Link Here
|
368 |
} else { |
372 |
} else { |
369 |
|
373 |
|
370 |
# If value is a date |
374 |
# If value is a date |
371 |
if ($value =~ C4::Dates->regexp('syspref')) { |
375 |
my $value_dt; |
372 |
$value = C4::Dates->new($value)->output("iso"); |
376 |
$value_dt = eval { dt_from_string( $value ); } if ( $value ); |
|
|
377 |
if ( $value_dt ) { |
378 |
$value = output_pref( { dt => dt_from_string( $value_dt ), dateonly => 1, dateformat => 'iso' } ); |
373 |
} |
379 |
} |
374 |
# don't escape runtime parameters, they'll be at runtime |
380 |
# don't escape runtime parameters, they'll be at runtime |
375 |
if ($value =~ /<<.*>>/) { |
381 |
if ($value =~ /<<.*>>/) { |
376 |
- |
|
|