[Koha-cvs] koha/opac opac-search.pl

Joshua Ferraro jmf at kados.org
Sun May 21 04:27:24 CEST 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch: 	
Changes by:	Joshua Ferraro <kados at savannah.gnu.org>	06/05/21 02:27:24

Modified files:
	opac           : opac-search.pl 

Log message:
	merging dev-week and HEAD

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/opac/opac-search.pl.diff?tr1=1.35&tr2=1.36&r1=text&r2=text

Patches:
Index: koha/opac/opac-search.pl
diff -u koha/opac/opac-search.pl:1.35 koha/opac/opac-search.pl:1.36
--- koha/opac/opac-search.pl:1.35	Thu Feb  9 03:12:23 2006
+++ koha/opac/opac-search.pl	Sun May 21 02:27:24 2006
@@ -80,12 +80,13 @@
 	my $orderby = $query->param('orderby');
 	my $desc_or_asc = $query->param('desc_or_asc');
 	my $exactsearch = $query->param('exact');
-
 	for (my $i=0;$i<=$#marclist;$i++) {
 		if ($searchdesc) { # don't put the and_or on the 1st search term
 			$searchdesc .= $and_or[$i].$excluding[$i]." ".($marclist[$i]?$marclist[$i]:"*").$operator[$i].$value[$i] if ($value[$i]);
 		} else {
 			$searchdesc = $excluding[$i].($marclist[$i]?$marclist[$i]:"*").$operator[$i].$value[$i] if ($value[$i]);
+		if ($marclist[$i] eq "biblioitems.isbn") {
+			$value[$i] =~ s/-//g;
 		}
 	}
   if ($itemtypesstring ne ''){
@@ -374,24 +375,35 @@
 				});
 	
 	
-	$sth=$dbh->prepare("Select itemtype,description from itemtypes order by description");
+	my $query="Select itemtype,description from itemtypes order by description";
+	my $sth=$dbh->prepare($query);
 	$sth->execute;
-	my  @itemtype;
+	my  @itemtypeloop;
 	my %itemtypes;
-	push @itemtype, "";
-	$itemtypes{''} = "";
 	while (my ($value,$lib) = $sth->fetchrow_array) {
-		push @itemtype, $value;
-		$itemtypes{$value}=$lib;
+		my %row =(	value => $value,
+					description => $lib,
+				);
+		push @itemtypeloop, \%row;
 	}
-	
-	my $CGIitemtype=CGI::scrolling_list( -name     => 'value',
-				-values   => \@itemtype,
-				-labels   => \%itemtypes,
+	$sth->finish;
+
+	my @oldbranches;
+	my @oldselect_branch;
+	my %oldselect_branches;
+	my ($oldcount2, at oldbranches)=branches();
+	push @oldselect_branch, "";
+	$oldselect_branches{''} = "";
+	for (my $i=0;$i<$oldcount2;$i++){
+		push @oldselect_branch, $oldbranches[$i]->{'branchcode'};#
+		$oldselect_branches{$oldbranches[$i]->{'branchcode'}} = $oldbranches[$i]->{'branchname'};
+	}
+	my $CGIbranch=CGI::scrolling_list( -name     => 'value',
+				-values   => \@oldselect_branch,
+				-labels   => \%oldselect_branches,
 				-size     => 1,
 				-multiple => 0 );
 	$sth->finish;
-	
 	my @select_branch;
 	my %select_branches;
 	my $branches=getbranches();
@@ -417,6 +429,13 @@
 					CGIbranch => $CGIbranch,
 					suggestion => C4::Context->preference("suggestion"),
 					virtualshelves => C4::Context->preference("virtualshelves"),
+					LibraryName => C4::Context->preference("LibraryName"),
+					OpacNav => C4::Context->preference("OpacNav"),
+					opaccredits => C4::Context->preference("opaccredits"),
+					AmazonContent => C4::Context->preference("AmazonContent"),
+				opacsmallimage => C4::Context->preference("opacsmallimage"),
+				opaclayoutstylesheet => C4::Context->preference("opaclayoutstylesheet"),
+				opaccolorstylesheet => C4::Context->preference("opaccolorstylesheet"),
 	);
 }
 # ADDED BY JF





More information about the Koha-cvs mailing list