[Koha-cvs] koha/C4 Search.pm [rel_3_0]

Antoine Farnault antoine at koha-fr.org
Mon Oct 23 15:26:48 CEST 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	Antoine Farnault <toins>	06/10/23 13:26:48

Modified files:
	C4             : Search.pm 

Log message:
	SQL Query in bibdata sub now compatible with mysql 5 & 4.1

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Search.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.120.2.14&r2=1.120.2.15

Patches:
Index: Search.pm
===================================================================
RCS file: /sources/koha/koha/C4/Search.pm,v
retrieving revision 1.120.2.14
retrieving revision 1.120.2.15
diff -u -b -r1.120.2.14 -r1.120.2.15
--- Search.pm	23 Oct 2006 10:12:51 -0000	1.120.2.14
+++ Search.pm	23 Oct 2006 13:26:48 -0000	1.120.2.15
@@ -32,7 +32,6 @@
 
 use Lingua::Stem;
 	
-
 	# FIXME - C4::Search uses C4::Reserves2, which uses C4::Search.
 	# So Perl complains that all of the functions here get redefined.
 #use C4::Date;
@@ -40,7 +39,7 @@
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 
 # set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.120.2.14 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.120.2.15 $' =~ /\d+/g;
           shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
 
 =head1 NAME
@@ -1432,13 +1431,13 @@
 sub bibdata {
 	my ($bibnum, $type) = @_;
 	my $dbh   = C4::Context->dbh;
+	
 	my $query = "
-	    SELECT *, biblioitems.notes AS bnotes, biblio.notes
-		FROM   biblio, biblioitems
-		    LEFT JOIN bibliosubtitle ON
- 			    biblio.biblionumber = bibliosubtitle.biblionumber
- 			LEFT JOIN itemtypes ON
- 			    biblioitems.itemtype=itemtypes.itemtype
+        SELECT * , biblioitems.notes AS bnotes, biblio.notes
+        FROM biblio
+            LEFT JOIN biblioitems ON biblio.biblionumber = biblioitems.biblionumber
+            LEFT JOIN bibliosubtitle ON biblio.biblionumber = bibliosubtitle.biblionumber
+            LEFT JOIN itemtypes ON biblioitems.itemtype = itemtypes.itemtype
 		WHERE  biblio.biblionumber = ?
 		    AND biblioitems.biblionumber = biblio.biblionumber
 	";
@@ -1477,6 +1476,8 @@
 	chop $data->{'additionalauthors'};
 	chop $data->{'additionalauthors'};
 	$sth->finish;
+	use Data::Dumper;
+	warn "DATA==>".Dumper($data);
 	return($data);
 } # sub bibdata
 





More information about the Koha-cvs mailing list