X-Git-Url: http://git.rot13.org/?p=koha.git;a=blobdiff_plain;f=C4%2FAuth.pm;h=482ca16fc9b621ce0047d5a618929cd0a93ffc12;hp=06806ff065431b776f8a75e6f475f70b7fd782f6;hb=03890c90ac41f66b2de04d0280e2e96a0d2e8be8;hpb=c523ae2d646350996efa9cfc1e6149e1f1fac722 diff --git a/C4/Auth.pm b/C4/Auth.pm index 06806ff065..482ca16fc9 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -387,6 +387,15 @@ sub get_template_and_user { } elsif($mylibraryfirst){ $opac_name = C4::Branch::GetBranchName($mylibraryfirst); } + 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"), @@ -426,7 +435,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"), @@ -912,6 +920,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, @@ -925,7 +942,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"),