[Koha-cvs] koha/opac opac-search.pl
Chris Cormack
chris at katipo.co.nz
Thu Feb 9 04:12:23 CET 2006
CVSROOT: /sources/koha
Module name: koha
Branch:
Changes by: Chris Cormack <rangi at savannah.gnu.org> 06/02/09 03:12:23
Modified files:
opac : opac-search.pl
Log message:
Fixing broken code to show list of branches
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/opac/opac-search.pl.diff?tr1=1.34&tr2=1.35&r1=text&r2=text
Patches:
Index: koha/opac/opac-search.pl
diff -u koha/opac/opac-search.pl:1.34 koha/opac/opac-search.pl:1.35
--- koha/opac/opac-search.pl:1.34 Thu Feb 9 01:26:16 2006
+++ koha/opac/opac-search.pl Thu Feb 9 03:12:23 2006
@@ -11,6 +11,8 @@
use C4::SearchMarc;
use C4::Acquisition;
use C4::Biblio;
+use C4::Koha;
+
my @spsuggest; # the array for holding suggestions
my $suggest; # a flag to be set (if there are suggestions it's 1)
my $firstbiblionumber; # needed for directly sending user to first item
@@ -390,15 +392,14 @@
-multiple => 0 );
$sth->finish;
- my @branches;
my @select_branch;
my %select_branches;
- my ($count2, at branches)=branches();
+ my $branches=getbranches();
push @select_branch, "";
$select_branches{''} = "";
- for (my $i=0;$i<$count2;$i++){
- push @select_branch, $branches[$i]->{'branchcode'};#
- $select_branches{$branches[$i]->{'branchcode'}} = $branches[$i]->{'branchname'};
+ foreach my $branch ( keys %$branches ){
+ push @select_branch, $branches->{$branch}->{'branchcode'};
+ $select_branches{$branches->{$branch}->{'branchcode'}} = $branches->{$branch}->{'branchname'};
}
my $CGIbranch=CGI::scrolling_list( -name => 'value',
-values => \@select_branch,
More information about the Koha-cvs
mailing list