https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30718

--- Comment #41 from Jonathan Druart <[email protected]> ---
(In reply to Marcel de Rooy from comment #38)
> Minor code observations:
> 
> Koha/Hold.pm
> +    $date &&= dt_from_string($date)->truncate( to => 'day' )->datetime;
> Obsure code

Obscure? It's using a basic perl operator...

Prefer the verbose if version

if ( $date ) {
     $date = dt_from_string($date)->truncate( to => 'day' )->datetime;
}
or the ugly ternary?
$date = $date ? dt_from_string($date)->truncate( to => 'day' )->datetime :
undef

I don't.

> clubs/clubs-add-modify.pl
> +my $date_start = $cgi->param('date_start') || undef;
> Does this || undef really serve any purpose here?
> Not the only occurrence btw.

I don't know, but trying to prevent regressions by keeping the exact same
behaviours.

(In reply to Marcel de Rooy from comment #39)
> Editing items: Should $w Price effective from be controlled by flatpickr ?

Isn't it already?

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to