View | Details | Raw Unified | Return to bug 11120
Collapse All | Expand All

(-)a/misc/cronjobs/overdue_notices.pl (-3 / +4 lines)
Lines 360-372 if (@branchcodes) { Link Here
360
my $date_to_run;
360
my $date_to_run;
361
my $date;
361
my $date;
362
if ( $date_input ){
362
if ( $date_input ){
363
    $date = $dbh->quote($date);
364
    eval {
363
    eval {
365
        $date_to_run = dt_from_string( $date_input );
364
        $date_to_run = dt_from_string( $date_input, 'iso' );
366
    };
365
    };
367
    die "$date_input is not a valid date, aborting! Use a date in format YYYY-MM-DD."
366
    die "$date_input is not a valid date, aborting! Use a date in format YYYY-MM-DD."
368
        if $@ or not $date_to_run;
367
        if $@ or not $date_to_run;
369
368
369
    # It's certainly useless to escape $date_input
370
    # dt_from_string should not return something if $date_input is not correctly set.
371
    $date = $dbh->quote( $date_input );
370
}
372
}
371
else {
373
else {
372
    $date="NOW()";
374
    $date="NOW()";
373
- 

Return to bug 11120