[Koha-cvs] koha/C4 Biblio.pm [rel_2_2]

Chris Cormack chris at katipo.co.nz
Fri Jan 19 10:11:36 CET 2007


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_2_2
Changes by:	Chris Cormack <rangi>	07/01/19 09:11:36

Modified files:
	C4             : Biblio.pm 

Log message:
	Applying patch to fix bug 1230
	On editing marc entry: Publisher fields(tag 260) NOT stored as utf8 in mysql

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Biblio.pm?cvsroot=koha&only_with_tag=rel_2_2&r1=1.115.2.64&r2=1.115.2.65

Patches:
Index: Biblio.pm
===================================================================
RCS file: /sources/koha/koha/C4/Biblio.pm,v
retrieving revision 1.115.2.64
retrieving revision 1.115.2.65
diff -u -b -r1.115.2.64 -r1.115.2.65
--- Biblio.pm	22 Nov 2006 16:02:52 -0000	1.115.2.64
+++ Biblio.pm	19 Jan 2007 09:11:35 -0000	1.115.2.65
@@ -26,7 +26,7 @@
 use vars qw($VERSION @ISA @EXPORT);
 
 # set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.115.2.64 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.115.2.65 $' =~ /\d+/g;
                     shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
 
 @ISA = qw(Exporter);
@@ -1765,59 +1765,61 @@
 }    # sub modsubject
 
 sub OLDmodbibitem {
+# modified by rhariram to fix koha bug 1230
+# See http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1230
     my ( $dbh, $biblioitem ) = @_;
     my $query;
+    my $sth;
 
-    $biblioitem->{'itemtype'}      = $dbh->quote( $biblioitem->{'itemtype'} );
-    $biblioitem->{'url'}           = $dbh->quote( $biblioitem->{'url'} );
-    $biblioitem->{'isbn'}          = $dbh->quote( $biblioitem->{'isbn'} );
-    $biblioitem->{'issn'}          = $dbh->quote( $biblioitem->{'issn'} );
-    $biblioitem->{'publishercode'} =
-      $dbh->quote( $biblioitem->{'publishercode'} );
-    $biblioitem->{'publicationyear'} =
-      $dbh->quote( $biblioitem->{'publicationyear'} );
-    $biblioitem->{'classification'} =
-      $dbh->quote( $biblioitem->{'classification'} );
-    $biblioitem->{'dewey'}       = $dbh->quote( $biblioitem->{'dewey'} );
-    $biblioitem->{'subclass'}    = $dbh->quote( $biblioitem->{'subclass'} );
-    $biblioitem->{'illus'}       = $dbh->quote( $biblioitem->{'illus'} );
-    $biblioitem->{'pages'}       = $dbh->quote( $biblioitem->{'pages'} );
-    $biblioitem->{'volumeddesc'} = $dbh->quote( $biblioitem->{'volumeddesc'} );
-    $biblioitem->{'volumedate'} = $dbh->quote( $biblioitem->{'volumedate'} );
-    $biblioitem->{'bnotes'}      = $dbh->quote( $biblioitem->{'bnotes'} );
-    $biblioitem->{'size'}        = $dbh->quote( $biblioitem->{'size'} );
-    $biblioitem->{'place'}       = $dbh->quote( $biblioitem->{'place'} );
-    $biblioitem->{'volume'}       = $dbh->quote( $biblioitem->{'volume'} );
-    $biblioitem->{'number'}       = $dbh->quote( $biblioitem->{'number'} );
-    $biblioitem->{'lccn'}       = $dbh->quote( $biblioitem->{'lccn'} );
-
-    $query = "Update biblioitems set
-itemtype        = $biblioitem->{'itemtype'},
-url             = $biblioitem->{'url'},
-isbn            = $biblioitem->{'isbn'},
-issn            = $biblioitem->{'issn'},
-publishercode   = $biblioitem->{'publishercode'},
-publicationyear = $biblioitem->{'publicationyear'},
-classification  = $biblioitem->{'classification'},
-dewey           = $biblioitem->{'dewey'},
-subclass        = $biblioitem->{'subclass'},
-illus           = $biblioitem->{'illus'},
-pages           = $biblioitem->{'pages'},
-volumeddesc     = $biblioitem->{'volumeddesc'},
-volumedate     = $biblioitem->{'volumedate'},
-notes 		= $biblioitem->{'bnotes'},
-size		= $biblioitem->{'size'},
-place		= $biblioitem->{'place'},
-volume		= $biblioitem->{'volume'},
-number		= $biblioitem->{'number'},
-lccn		= $biblioitem->{'lccn'}
-
-where biblioitemnumber = $biblioitem->{'biblioitemnumber'}";
-
-    $dbh->do($query);
-    if ( $dbh->errstr ) {
-        warn "$query";
-    }
+    $query = "";
+    $sth   =
+      $dbh->prepare(
+    "Update biblioitems set
+	itemtype        = ?,
+	url             = ?,
+	isbn            = ?,
+	issn            = ?,
+	publishercode   = ?,
+	publicationyear = ?,
+	classification  = ?,
+	dewey           = ?,
+	subclass        = ?,
+	illus           = ?,
+	pages           = ?,
+	volumeddesc     = ?,
+	volumedate     = ?,
+	notes 		= ?,
+	size		= ?,
+	place		= ?,
+	volume		= ?,
+	number		= ?,
+	lccn		= ?
+	where biblioitemnumber = ?"
+    );
+
+    $sth->execute(
+	$biblioitem->{'itemtype'},
+	$biblioitem->{'url'},
+	$biblioitem->{'isbn'},
+	$biblioitem->{'issn'},
+	$biblioitem->{'publishercode'},
+	$biblioitem->{'publicationyear'},
+	$biblioitem->{'classification'},
+	$biblioitem->{'dewey'},
+	$biblioitem->{'subclass'},
+	$biblioitem->{'illus'},
+	$biblioitem->{'pages'},
+	$biblioitem->{'volumeddesc'},
+	$biblioitem->{'volumedate'},
+	$biblioitem->{'bnotes'},
+	$biblioitem->{'size'},
+	$biblioitem->{'place'},
+	$biblioitem->{'volume'},
+	$biblioitem->{'number'},
+	$biblioitem->{'lccn'},
+	$biblioitem->{'biblioitemnumber'}
+    );
+    $sth->finish;
 }    # sub modbibitem
 
 sub OLDmodnote {
@@ -3010,8 +3012,12 @@
 
 =cut
 
-# $Id: Biblio.pm,v 1.115.2.64 2006/11/22 16:02:52 tipaul Exp $
+# $Id: Biblio.pm,v 1.115.2.65 2007/01/19 09:11:35 rangi Exp $
 # $Log: Biblio.pm,v $
+# Revision 1.115.2.65  2007/01/19 09:11:35  rangi
+# Applying patch to fix bug 1230
+# On editing marc entry: Publisher fields(tag 260) NOT stored as utf8 in mysql
+#
 # Revision 1.115.2.64  2006/11/22 16:02:52  tipaul
 # fix for #1177 = removal of additionnal authors & bibliosubjects
 #





More information about the Koha-cvs mailing list