[Koha-cvs] koha/C4 Auth.pm [rel_3_0]

Antoine Farnault antoine at koha-fr.org
Fri Aug 25 16:19:19 CEST 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	Antoine Farnault <toins>	06/08/25 14:19:19

Modified files:
	C4             : Auth.pm 

Log message:
	fix a bug when running opac's scripts

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Auth.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.54&r2=1.54.2.1

Patches:
Index: Auth.pm
===================================================================
RCS file: /sources/koha/koha/C4/Auth.pm,v
retrieving revision 1.54
retrieving revision 1.54.2.1
diff -u -b -r1.54 -r1.54.2.1
--- Auth.pm	21 Jul 2006 10:15:25 -0000	1.54
+++ Auth.pm	25 Aug 2006 14:19:19 -0000	1.54.2.1
@@ -202,11 +202,24 @@
         }
 
         if ( $flags && $flags->{tools} == 1 ) {
-            $template->param( CAN_user_tools => 1 );
+			$template->param(CAN_user_tools => 1); }
+		
         }
+	if  ($in->{'type'} eq "intranet") {
+                $template->param(
+                        intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),  
+                        intranetstylesheet => C4::Context->preference("intranetstylesheet"),
+                        IntranetNav => C4::Context->preference("IntranetNav"),
+                        TemplateEncoding => C4::Context->preference("TemplateEncoding"),
+                        AmazonContent    => C4::Context->preference("AmazonContent"),
+                        LibraryName      => C4::Context->preference("LibraryName"),
+                        branchname       => C4::Context->userenv->{"branchname"}, 
+                );
 
     }
-    unless ( $in->{'type'} eq "intranet" ) {
+        else {
+            warn "template type should be OPAC, here it is=[".$in->{'type'}."]" unless ($in->{'type'} eq 'opac');
+            
         $template->param(
             suggestion           => C4::Context->preference("suggestion"),
             virtualshelves       => C4::Context->preference("virtualshelves"),
@@ -214,23 +227,21 @@
             opacheader           => C4::Context->preference("opacheader"),
             opaccredits          => C4::Context->preference("opaccredits"),
             opacsmallimage       => C4::Context->preference("opacsmallimage"),
-            opaclayoutstylesheet =>
-              C4::Context->preference("opaclayoutstylesheet"),
-            opaccolorstylesheet =>
-              C4::Context->preference("opaccolorstylesheet"),
-            opaclanguagesdisplay =>
-              C4::Context->preference("opaclanguagesdisplay"),
-            TemplateEncoding => C4::Context->preference("TemplateEncoding"),
+		opaclayoutstylesheet => C4::Context->preference("opaclayoutstylesheet"),
+		opaccolorstylesheet => C4::Context->preference("opaccolorstylesheet"),
+		opaclanguagesdisplay => C4::Context->preference("opaclanguagesdisplay"),
             opacuserlogin    => C4::Context->preference("opacuserlogin"),
             opacbookbag      => C4::Context->preference("opacbookbag"),
+            
+          # FIXME : can't understand why there is an internal servor error when the line bellow
+          #         are uncommented.
+          
+          #      TemplateEncoding => C4::Context->preference("TemplateEncoding"),
+          #      AmazonContent    => C4::Context->preference("AmazonContent"),
+          #      LibraryName      => C4::Context->preference("LibraryName"),
+          #      branchname       => C4::Context->userenv->{"branchname"}, 
         );
     }
-    $template->param(
-        TemplateEncoding => C4::Context->preference('TemplateEncoding'),
-        AmazonContent    => C4::Context->preference('AmazonContent'),
-        LibraryName      => C4::Context->preference('LibraryName'),
-        branchname       => C4::Context->userenv->{'branchname'},
-    );
     return ( $template, $borrowernumber, $cookie );
 }
 





More information about the Koha-cvs mailing list