From 18551e4c4e8a94091e951b43bbf09d159da04037 Mon Sep 17 00:00:00 2001 From: hdl Date: Wed, 11 Oct 2006 13:14:46 +0000 Subject: [PATCH] Adding branch selection if SearchMyLibraryFirst is set Antoine .... Your turn --- opac/opac-main.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opac/opac-main.pl b/opac/opac-main.pl index b07b67eeed..64b50b64cb 100755 --- a/opac/opac-main.pl +++ b/opac/opac-main.pl @@ -75,7 +75,10 @@ if (C4::Context->preference("SearchMyLibraryFirst")){ my %row =('value' => $thisbranch, 'branchname' => $branches->{$thisbranch}->{'branchname'}, ); - $row{'selected'} = 1 if ($thisbranch eq C4::Context->userenv->{branch}); + $row{'selected'} = C4::Context->userenv->{branch} if ($thisbranch eq C4::Context->userenv->{branch}); + foreach (keys %row){ + warn "$_ : $row{$_}"; + } push @branchloop, \%row; } $template->param("mylibraryfirst"=>1,"branchloop"=>\@branchloop);