From: Paul POULAIN Date: Tue, 16 Oct 2007 21:02:45 +0000 (-0500) Subject: SearchMyLibraryFirst : reintroducing behaviour (from 2.2) X-Git-Tag: v3.00.00-alpha~1425 X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=847bf18dad562a58991aefb4113640877b93f7a2;p=koha.git SearchMyLibraryFirst : reintroducing behaviour (from 2.2) If the SearchMyLibraryFirst is set, then a logged user will automatically limit the search to it's own library. I also did some code cleaning Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- diff --git a/C4/Auth.pm b/C4/Auth.pm index 6d792eaaf3..0d4e825fdc 100755 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -260,7 +260,7 @@ sub get_template_and_user { ); } else { - warn "template type should be OPAC, here it is=[" . $in->{'type'} . "]" unless ( $in->{'type'} eq 'opac' ); + warn "template type should be OPAC, here it is=[" . $in->{'type'} . "]" unless ( $in->{'type'} eq 'opac' ); my $LibraryNameTitle = C4::Context->preference("LibraryName"); $LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi; $LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg; @@ -297,6 +297,7 @@ sub get_template_and_user { reviewson => C4::Context->preference("reviewson"), hide_marc => C4::Context->preference("hide_marc"), patronimages => C4::Context->preference("patronimages"), + mylibraryfirst => C4::Context->preference("SearchMyLibraryFirst"), "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, ); } diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc index b375e2ccbc..1d4408b2f5 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc @@ -11,8 +11,12 @@