X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=C4%2FAuth.pm;h=33602b9715be3576acf637cbbc81db4575d63e62;hb=1e7c5166aa4fa8f983cce549803c8ddc8893c846;hp=7a0c13ea293579da7f7980701d375c216ba3ac0c;hpb=8307a1f79d8143e05c734cc750bb420c1ff41e1c;p=koha.git diff --git a/C4/Auth.pm b/C4/Auth.pm index 7a0c13ea29..33602b9715 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -396,6 +396,15 @@ sub get_template_and_user { } elsif (C4::Context->preference("SearchMyLibraryFirst") && C4::Context->userenv && C4::Context->userenv->{'branch'}) { $opac_name = C4::Context->userenv->{'branch'}; } + my $checkstyle = C4::Context->preference("opaccolorstylesheet"); + if ($checkstyle =~ /http/) + { + $template->param( opacexternalsheet => $checkstyle); + } else + { + my $opaccolorstylesheet = C4::Context->preference("opaccolorstylesheet"); + $template->param( opaccolorstylesheet => $opaccolorstylesheet); + } $template->param( AmazonContent => "" . C4::Context->preference("AmazonContent"), AnonSuggestions => "" . C4::Context->preference("AnonSuggestions"), @@ -435,7 +444,6 @@ sub get_template_and_user { hidelostitems => C4::Context->preference("hidelostitems"), mylibraryfirst => (C4::Context->preference("SearchMyLibraryFirst") && C4::Context->userenv) ? C4::Context->userenv->{'branch'} : '', 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"), @@ -468,7 +476,7 @@ sub get_template_and_user { SyndeticsCoverImageSize => C4::Context->preference("SyndeticsCoverImageSize"), ); - $template->param(OpacPublic => '1') if ($template->param( 'loggedinusername') || C4::Context->preference("OpacPublic")); + $template->param(OpacPublic => '1') if ($user || C4::Context->preference("OpacPublic")); } $template->param(listloop=>[{shelfname=>"Freelist", shelfnumber=>110}]); return ( $template, $borrowernumber, $cookie, $flags); @@ -923,6 +931,15 @@ sub checkauth { my $template_name = ( $type eq 'opac' ) ? 'opac-auth.tmpl' : 'auth.tmpl'; my $template = gettemplate( $template_name, $type, $query ); $template->param(branchloop => \@branch_loop,); + my $checkstyle = C4::Context->preference("opaccolorstylesheet"); + if ($checkstyle =~ /\//) + { + $template->param( opacexternalsheet => $checkstyle); + } else + { + my $opaccolorstylesheet = C4::Context->preference("opaccolorstylesheet"); + $template->param( opaccolorstylesheet => $opaccolorstylesheet); + } $template->param( login => 1, INPUTS => \@inputs, @@ -937,7 +954,6 @@ sub checkauth { opacreadinghistory => C4::Context->preference("opacreadinghistory"), opacsmallimage => C4::Context->preference("opacsmallimage"), opaclayoutstylesheet => C4::Context->preference("opaclayoutstylesheet"), - opaccolorstylesheet => C4::Context->preference("opaccolorstylesheet"), opaclanguagesdisplay => C4::Context->preference("opaclanguagesdisplay"), opacuserjs => C4::Context->preference("opacuserjs"), opacbookbag => "" . C4::Context->preference("opacbookbag"), @@ -975,7 +991,7 @@ sub checkauth { url => $self_url, LibraryName => C4::Context->preference("LibraryName"), ); - $template->param( \%info ); + $template->param( %info ); # $cookie = $query->cookie(CGISESSID => $session->id # ); print $query->header(