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