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 @@
Search
+ (in only)
more search options
diff --git a/opac/opac-main.pl b/opac/opac-main.pl
index 0a548a90f0..dfaf06de8f 100755
--- a/opac/opac-main.pl
+++ b/opac/opac-main.pl
@@ -32,8 +32,6 @@ use C4::Acquisition; # GetRecentAcqui
my $input = new CGI;
my $dbh = C4::Context->dbh;
-my $limit = $input->param('recentacqui');
-
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
{
template_name => "opac-main.tmpl",
@@ -44,42 +42,6 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
}
);
-if ($limit) {
- my $recentacquiloop = GetRecentAcqui($limit);
-
- # warn Data::Dumper::Dumper($recentacquiloop);
- $template->param( recentacquiloop => $recentacquiloop, );
-}
-
-# SearchMyLibraryFirst
-if ( C4::Context->preference("SearchMyLibraryFirst") ) {
- if ( C4::Context->userenv ) {
- my $branches = GetBranches();
- my @branchloop;
-
- foreach my $thisbranch (sort keys %$branches ) {
- my $selected = 1
- if ( C4::Context->userenv
- && ( $thisbranch eq C4::Context->userenv->{branch} ) );
-
-# warn $thisbranch;
-# warn C4::Context->userenv;
-# warn C4::Context->userenv->{branch};
-# warn " => ".C4::Context->userenv && ($thisbranch eq C4::Context->userenv->{branch});
- my %row = (
- value => $thisbranch,
- selected => $selected,
- branchname => $branches->{$thisbranch}->{'branchname'},
- );
- push @branchloop, \%row;
- }
- $template->param( "mylibraryfirst" => 1, branchloop => \@branchloop );
- }
- else {
- $template->param( "mylibraryfirst" => 0 );
- }
-}
-
my $borrower = GetMember( $borrowernumber, 'borrowernumber' );
my @languages;
my $counter = 0;