From 1f54d10475abbeea9bb777c615415e7b849bf2c3 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 28 Jan 2010 09:48:54 -0500 Subject: [PATCH] Fix for Bug 4073, Add globally template variable for dateformat setting Signed-off-by: Galen Charlton --- C4/Auth.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/C4/Auth.pm b/C4/Auth.pm index ea10d16816..90ce2b83ef 100755 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -324,6 +324,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, -- 2.39.2