quickfix for displaying collection-code in opac
[koha.git] / opac / opac-main.pl
index cc42d1e..5875baa 100755 (executable)
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id$
 
 use strict;
 require Exporter;
 use CGI;
 use C4::Auth;    # get_template_and_user
 use C4::Output;
-use C4::BookShelves;
+use C4::VirtualShelves;
 use C4::Languages;       # getTranslatedLanguages
 use C4::Branch;          # GetBranches
 use C4::Members;         # GetMember
@@ -32,8 +31,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 +41,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 ( 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;