[Koha-patches] [PATCH] Pull the last OPAC-specific tmpl vars out of gettemplate.
Joe Atzberger
joe.atzberger at liblime.com
Wed Jun 3 08:24:17 CEST 2009
These don't belong every template, only on OPAC:
~ opacstylesheet
~ opaccolorstylesheet
~ opacsmallimage
The latter 2 were already being populated in C4::Auth anyway.
---
C4/Auth.pm | 5 +++--
C4/Output.pm | 9 +++------
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/C4/Auth.pm b/C4/Auth.pm
index f74b4e0..64fd423 100644
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -360,12 +360,13 @@ sub get_template_and_user {
XSLTResultsDisplay => C4::Context->preference("XSLTResultsDisplay"),
hidelostitems => C4::Context->preference("hidelostitems"),
mylibraryfirst => (C4::Context->preference("SearchMyLibraryFirst")) ? C4::Context->userenv->{'branch'} : '',
- opacbookbag => "" . C4::Context->preference("opacbookbag"),
+ opaclayoutstylesheet => "" . C4::Context->preference("opaclayoutstylesheet"),
opaccolorstylesheet => "" . C4::Context->preference("opaccolorstylesheet"),
+ opacstylesheet => "" . C4::Context->preference("opacstylesheet"),
+ opacbookbag => "" . C4::Context->preference("opacbookbag"),
opaccredits => "" . C4::Context->preference("opaccredits"),
opacheader => "" . C4::Context->preference("opacheader"),
opaclanguagesdisplay => "" . C4::Context->preference("opaclanguagesdisplay"),
- opaclayoutstylesheet => "" . C4::Context->preference("opaclayoutstylesheet"),
opacreadinghistory => C4::Context->preference("opacreadinghistory"),
opacsmallimage => "" . C4::Context->preference("opacsmallimage"),
opacuserjs => C4::Context->preference("opacuserjs"),
diff --git a/C4/Output.pm b/C4/Output.pm
index 6604ae0..a147bfd 100644
--- a/C4/Output.pm
+++ b/C4/Output.pm
@@ -100,13 +100,10 @@ sub gettemplate {
. "/$theme/$lang";
$template->param(
themelang => $themelang,
- yuipath => (C4::Context->preference("yuipath") eq "local"?"$themelang/lib/yui":C4::Context->preference("yuipath")),
+ yuipath => (C4::Context->preference("yuipath") eq "local"?"$themelang/lib/yui":C4::Context->preference("yuipath")),
interface => ( $interface ne 'intranet' ? '/opac-tmpl' : '/intranet-tmpl' ),
- theme => $theme,
- opacstylesheet => $opacstylesheet,
- opaccolorstylesheet => C4::Context->preference('opaccolorstylesheet'),
- opacsmallimage => C4::Context->preference('opacsmallimage'),
- lang => $lang
+ theme => $theme,
+ lang => $lang
);
# Bidirectionality
--
1.5.6.5
More information about the Koha-patches
mailing list