From f59c9706a42bc76630064e5c061b423fac4838bd Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Mon, 12 May 2008 22:27:49 +0200 Subject: [PATCH] change in yuipath management 1/2 Noupdatedatabase.pl now yuipath is added in C4::Output and uses themelang In my opinion, all the general variables that are used in output should get in C4::Output (since there is theme lang computed.) rather than in C4::Auth Signed-off-by: Joshua Ferraro --- C4/Auth.pm | 2 -- C4/Output.pm | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 279c471f21..0e976047d2 100755 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -250,7 +250,6 @@ sub get_template_and_user { IntranetmainUserblock => C4::Context->preference("IntranetmainUserblock"), IndependantBranches => C4::Context->preference("IndependantBranches"), CircAutocompl => C4::Context->preference("CircAutocompl"), - yuipath => C4::Context->preference("yuipath"), FRBRizeEditions => C4::Context->preference("FRBRizeEditions"), AmazonSimilarItems => C4::Context->preference("AmazonSimilarItems"), 'item-level_itypes' => C4::Context->preference('item-level_itypes'), @@ -315,7 +314,6 @@ sub get_template_and_user { OPACFRBRizeEditions => C4::Context->preference("OPACFRBRizeEditions"), 'item-level_itypes' => C4::Context->preference('item-level_itypes'), 'Version' => C4::Context->preference('Version'), - yuipath => C4::Context->preference("yuipath"), singleBranchMode => C4::Context->preference("singleBranchMode"), XSLTResultsDisplay => C4::Context->preference("XSLTResultsDisplay"), XSLTDetailsDisplay => C4::Context->preference("XSLTDetailsDisplay"), diff --git a/C4/Output.pm b/C4/Output.pm index 4ad79dafcc..fc1a840b49 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -90,10 +90,11 @@ sub gettemplate { case_sensitive => 1, path => ["$htdocs/$theme/$lang/$path"] ); - + my $themelang=( $interface ne 'intranet' ? '/opac-tmpl' : '/intranet-tmpl' ) + . "/$theme/$lang"; $template->param( - themelang => ( $interface ne 'intranet' ? '/opac-tmpl' : '/intranet-tmpl' ) - . "/$theme/$lang", + themelang => $themelang, + 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, -- 2.39.2