[Koha-bugs] [Bug 10380] output_pref should use a hashref for parameters

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu May 30 14:42:22 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10380

--- Comment #1 from Jonathan Druart <jonathan.druart at biblibre.com> ---
Created attachment 18517
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18517&action=edit
Bug 10380: Change prototype for output_pref routine

Koha::DateUtils::output_pref takes 4 parameters and the last one is a
boolean, so some calls are:
  output_pref($dt, undef, undef, 1)

This patch changes it prototype to
  output_pref({
    dt => $dt,
    dateformat => $dateformat,
    timeformat => $timeformat,
    dateonly => $boolean
  });
an alternative is to call the output_pref routine with a datetime
object, without using an hashref:
  output_pref($dt);

Test plan:
Go on some page where dates are displayed (circulation, laterorder,
member page, etc.).
Launch the unit tests file t/DateUtils.t.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list