[Koha-patches] [PATCH] Fix for Bug 4073, Add globally template variable for dateformat setting
Owen Leonard
oleonard at myacpl.org
Thu Jan 28 15:48:54 CET 2010
---
C4/Auth.pm | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/C4/Auth.pm b/C4/Auth.pm
index f0be27c..206231d 100755
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -323,6 +323,18 @@ sub get_template_and_user {
}
}
+ 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);
+ }
+
# these template parameters are set the same regardless of $in->{'type'}
$template->param(
"BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1,
--
1.6.3.3
More information about the Koha-patches
mailing list