[Koha-bugs] [Bug 9108] Add uk/euro date sort filter to pages which require it

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Dec 11 20:16:57 CET 2012


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

Paul Poulain <paul.poulain at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Failed QA
                 CC|                            |paul.poulain at biblibre.com

--- Comment #6 from Paul Poulain <paul.poulain at biblibre.com> ---
QA comment:
 * I think the 1st patch is OK (untested)
 * I think the 2nd patch requires more work to remove now useless code.

I explain:
some of the following lines are removed:
-        "dateformat_" . C4::Context->preference('dateformat') => 1,
and it's OK.

However, in C4/Auth.pm, there are still references to such a construction, that
was needed with HTML::Template, but can be removed with T::T

The 2nd patch add in all templates the dateformat variable:
in C4/Auth.pm =
+        $template->param( dateformat => C4::Context->preference('dateformat')
);

Thus, the lines just after this new one in Auth.pm can be removed:
    if(C4::Context->preference('dateformat')){
        if(C4::Context->preference('dateformat') eq "metric"){
            $template->param(dateformat_metric => 1);
        } elsif(C4::Context->preference('dateformat') eq "us"){
            $template->param(dateformat_us => 1);
        } else {
            $template->param(dateformat_iso => 1);
        }
    } else {
        $template->param(dateformat_iso => 1);
    }

and all references to dateformat_metric, dateformat_us and dateformat_iso
should be replaced :
[% IF (dateformat_us ) %]
to replace with:
[% IF (dateformat eq 'us') %]

There is something like a dozen of templates that uses this construction.

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


More information about the Koha-bugs mailing list