Bug 13071: format_date should not be called in currency.pl
authorJonathan Druart <jonathan.druart@biblibre.com>
Fri, 10 Oct 2014 20:18:01 +0000 (22:18 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Fri, 24 Oct 2014 12:46:05 +0000 (09:46 -0300)
The TT plugin is used in the template, it is useless and can cause
problems to format the dates before sending them to the template.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes the problem I was seeing before, didn't find any regressions.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Checked all three settings of dateformat. Looks fine to me.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
admin/currency.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt

index 4849d31..9065681 100755 (executable)
@@ -42,7 +42,6 @@ use warnings;
 use CGI;
 use C4::Context;
 use C4::Auth;
-use C4::Dates qw(format_date);
 use C4::Output;
 use C4::Budgets qw/GetCurrency GetCurrencies/;
 
@@ -103,9 +102,6 @@ sub default_path {
     }
     $end_of_page--;
     my @display_curr = @currencies[ $offset .. $end_of_page ];
-    for my $c (@display_curr) {
-        $c->{timestamp} = format_date( $c->{timestamp} );
-    }
     my $activecurrency = GetCurrency();
 
     $template->param(
@@ -172,9 +168,6 @@ sub add_form {
             $template->param( $_ => $curr_rec->{$_} );
         }
     }
-    if ($date) {
-        $template->param( 'timestamp' => format_date($date) );
-    }
 
     return;
 }
index 189aefb..cbcb1a0 100644 (file)
             <input type="text" name="isocode" id="isocode" size="5" maxlength="5" value="[% isocode %]" />
         </li>
         <li>
-            <span class="label">Last updated: </span>[% timestamp %]
+            <span class="label">Last updated: </span>[% timestamp | $KohaDates %]
         </li>
         <li>
             <label for="active">Active: </label>