[Koha-cvs] koha/C4 Biblio.pm [dev_week]
Joshua Ferraro
jmf at kados.org
Tue Aug 29 14:17:19 CEST 2006
CVSROOT: /sources/koha
Module name: koha
Branch: dev_week
Changes by: Joshua Ferraro <kados> 06/08/29 12:17:19
Modified files:
C4 : Biblio.pm
Log message:
remove non-portable lcsort code that was causing failed queries
with rebuildnonmarc.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Biblio.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.115.2.51.2.15&r2=1.115.2.51.2.16
Patches:
Index: Biblio.pm
===================================================================
RCS file: /sources/koha/koha/C4/Biblio.pm,v
retrieving revision 1.115.2.51.2.15
retrieving revision 1.115.2.51.2.16
diff -u -b -r1.115.2.51.2.15 -r1.115.2.51.2.16
--- Biblio.pm 10 Aug 2006 02:10:20 -0000 1.115.2.51.2.15
+++ Biblio.pm 29 Aug 2006 12:17:19 -0000 1.115.2.51.2.16
@@ -47,7 +47,7 @@
&getbiblio &getstacks
&getbiblioitembybiblionumber
&getbiblioitem &getitemsbybiblioitem
- &skip &getitemtypes
+ &skip &getitemtypes &get_itypes
&MARCfind_oldbiblionumber_from_MARCbibid
@@ -1728,10 +1728,9 @@
$biblioitem->{'bnotes'} = $dbh->quote( $biblioitem->{'bnotes'} );
$biblioitem->{'size'} = $dbh->quote( $biblioitem->{'size'} );
$biblioitem->{'place'} = $dbh->quote( $biblioitem->{'place'} );
-my($lcsort)=calculatelc($biblioitem->{'classification'}).$biblioitem->{'subclass'};
-
-$lcsort=$dbh->quote($lcsort);
+# my($lcsort)=calculatelc($biblioitem->{'classification'}).$biblioitem->{'subclass'};
+# $lcsort=$dbh->quote($lcsort);
$query = "Update biblioitems set
@@ -1750,7 +1749,7 @@
notes = $biblioitem->{'bnotes'},
size = $biblioitem->{'size'},
place = $biblioitem->{'place'},
-lcsort =$lcsort where biblionumber = $biblioitem->{'biblionumber'}";
+where biblionumber = $biblioitem->{'biblionumber'}";
$dbh->do($query);
if ( $dbh->errstr ) {
@@ -2404,6 +2403,24 @@
return ( $count, @results );
} # sub getitemtypes
+# this is temporary until we separate collection codes and item types
+sub get_itypes {
+ my $count = 0;
+ my @results;
+ my $dbh = C4::Context->dbh;
+ my $sth=$dbh->prepare("SELECT * FROM authorised_values ORDER BY authorised_value");
+ $sth->execute;
+ while (my $data=$sth->fetchrow_hashref) {
+ if ($data->{category} =~ /ITYPES/) {
+ $count++;
+ $results[$count] = $data;
+ warn "data: $data";
+ }
+ }
+ $sth->finish;
+ return ($count, at results);
+}
+
sub getstacks{
my $dbh = C4::Context->dbh;
my $i=0;
@@ -2917,8 +2934,12 @@
=cut
-# $Id: Biblio.pm,v 1.115.2.51.2.15 2006/08/10 02:10:20 kados Exp $
+# $Id: Biblio.pm,v 1.115.2.51.2.16 2006/08/29 12:17:19 kados Exp $
# $Log: Biblio.pm,v $
+# Revision 1.115.2.51.2.16 2006/08/29 12:17:19 kados
+# remove non-portable lcsort code that was causing failed queries
+# with rebuildnonmarc.
+#
# Revision 1.115.2.51.2.15 2006/08/10 02:10:20 kados
# Turned warnings on, and running a search turned up lots of warnings.
# Cleaned up those ...
More information about the Koha-cvs
mailing list