[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha C4/Biblio.pm catalogue/MARCdetail.pl [rel_3_0]
From: |
paul poulain |
Subject: |
[Koha-cvs] koha C4/Biblio.pm catalogue/MARCdetail.pl [rel_3_0] |
Date: |
Tue, 16 Jan 2007 10:24:12 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: rel_3_0
Changes by: paul poulain <tipaul> 07/01/16 10:24:11
Modified files:
C4 : Biblio.pm
catalogue : MARCdetail.pl
Log message:
BUGFIXING :
when modifying or deleting an item, the biblio frameworkcode was
emptied.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Biblio.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.178.2.52&r2=1.178.2.53
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/MARCdetail.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.5.2.8&r2=1.5.2.9
Patches:
Index: C4/Biblio.pm
===================================================================
RCS file: /sources/koha/koha/C4/Biblio.pm,v
retrieving revision 1.178.2.52
retrieving revision 1.178.2.53
diff -u -b -r1.178.2.52 -r1.178.2.53
--- C4/Biblio.pm 15 Jan 2007 17:20:55 -0000 1.178.2.52
+++ C4/Biblio.pm 16 Jan 2007 10:24:11 -0000 1.178.2.53
@@ -33,7 +33,7 @@
use vars qw($VERSION @ISA @EXPORT);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.178.2.52 $' =~ /\d+/g;
shift(@v).".".join( "_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.178.2.53 $' =~ /\d+/g;
shift(@v).".".join( "_", map { sprintf "%03d", $_ } @v ); };
@ISA = qw( Exporter );
@@ -294,7 +294,7 @@
my $dbh = C4::Context->dbh;
# add item in old-DB
- my $frameworkcode = MARCfind_frameworkcode( $dbh, $biblionumber );
+ my $frameworkcode = MARCfind_frameworkcode( $biblionumber );
my $item = &MARCmarc2koha( $dbh, $record, $frameworkcode );
# needs old biblionumber and biblioitemnumber
@@ -414,11 +414,10 @@
# we do the whole routine: update the MARC and zebra, then update the koha
# tables
if ($record) {
- MARCmoditem( $record, $biblionumber, $itemnumber, $delete );
- my $frameworkcode = MARCfind_frameworkcode( $dbh, $biblionumber );
+ my $frameworkcode = MARCfind_frameworkcode( $biblionumber );
+ MARCmoditem( $record, $biblionumber, $itemnumber, $frameworkcode,
$delete );
my $olditem = MARCmarc2koha( $dbh, $record, $frameworkcode );
_koha_modify_item( $dbh, $olditem );
- $frameworkcode = MARCfind_frameworkcode( $dbh, $biblionumber );
return $biblionumber;
}
@@ -443,6 +442,8 @@
my $sth =
$dbh->prepare(
"UPDATE biblio SET frameworkcode=? WHERE biblionumber=$biblionumber");
+
+ warn "IN ModBiblioframework";
$sth->execute($frameworkcode);
return 1;
}
@@ -554,7 +555,7 @@
my $dbh = C4::Context->dbh;
&_koha_delete_item( $dbh, $itemnumber );
my $newrec = &MARCdelitem( $biblionumber, $itemnumber );
- &MARCaddbiblio( $newrec, $biblionumber, );
+ &MARCaddbiblio( $newrec, $biblionumber,
MARCfind_frameworkcode($biblionumber) );
&logaction(C4::Context->userenv->{'number'},"CATALOGUING","DELETE",$itemnumber,"item")
if C4::Context->preference("CataloguingLog");
}
@@ -1371,7 +1372,7 @@
$frameworkcode = "";
}
my $sth =
- $dbh->prepare("update biblio set frameworkcode=? where biblionumber=?");
+ $dbh->prepare("UPDATE biblio SET frameworkcode=? WHERE biblionumber=?");
$sth->execute( $frameworkcode, $biblionumber );
$sth->finish;
my $encoding = C4::Context->preference("marcflavour");
@@ -1855,12 +1856,12 @@
=head2 MARCmoditem
-&MARCmoditem( $record, $biblionumber, $itemnumber, $delete )
+&MARCmoditem( $record, $biblionumber, $itemnumber, $frameworkcode, $delete )
=cut
sub MARCmoditem {
- my ( $record, $biblionumber, $itemnumber, $delete ) = @_;
+ my ( $record, $biblionumber, $itemnumber, $frameworkcode, $delete ) = @_;
my $dbh = C4::Context->dbh;
# delete this item from MARC
@@ -1879,7 +1880,7 @@
}
$newrec->append_fields($field);
}
- &MARCaddbiblio( $newrec, $biblionumber );
+ &MARCaddbiblio( $newrec, $biblionumber, $frameworkcode );
}
=head2 MARCfind_frameworkcode
@@ -3044,7 +3045,7 @@
my $MARCitem = &MARCkoha2marcItem( $dbh, $item->{'biblionumber'},
$item->{'itemnum'} );
&MARCmoditem( $MARCitem, $item->{biblionumber}, $item->{itemnum},
- 0 );
+ MARCfind_frameworkcode( $item->{biblionumber} ), 0 );
}
}
@@ -3256,7 +3257,7 @@
my ( $bibnum, $itemnum ) = @_;
my $dbh = C4::Context->dbh;
- my $frameworkcode = &MARCfind_frameworkcode( $dbh, $bibnum );
+ my $frameworkcode = &MARCfind_frameworkcode( $bibnum );
my ( $itemtagfield, $itemtagsubfield ) =
&MARCfind_marc_from_kohafield( $dbh, "items.itemnumber", $frameworkcode
);
my $tagslib = &MARCgettagslib( $dbh, 1, $frameworkcode );
@@ -3677,8 +3678,12 @@
=cut
-# $Id: Biblio.pm,v 1.178.2.52 2007/01/15 17:20:55 toins Exp $
+# $Id: Biblio.pm,v 1.178.2.53 2007/01/16 10:24:11 tipaul Exp $
# $Log: Biblio.pm,v $
+# Revision 1.178.2.53 2007/01/16 10:24:11 tipaul
+# BUGFIXING :
+# when modifying or deleting an item, the biblio frameworkcode was emptied.
+#
# Revision 1.178.2.52 2007/01/15 17:20:55 toins
# *** empty log message ***
#
Index: catalogue/MARCdetail.pl
===================================================================
RCS file: /sources/koha/koha/catalogue/MARCdetail.pl,v
retrieving revision 1.5.2.8
retrieving revision 1.5.2.9
diff -u -b -r1.5.2.8 -r1.5.2.9
--- catalogue/MARCdetail.pl 12 Jan 2007 18:05:43 -0000 1.5.2.8
+++ catalogue/MARCdetail.pl 16 Jan 2007 10:24:11 -0000 1.5.2.9
@@ -95,13 +95,13 @@
my $query = new CGI;
my $dbh = C4::Context->dbh;
my $biblionumber = $query->param('biblionumber');
-my $itemtype = $query->param('frameworkcode');
+my $frameworkcode = MARCfind_frameworkcode( $biblionumber );
my $popup =
$query->param('popup')
; # if set to 1, then don't insert links, it's just to show the biblio
my $subscriptionid = $query->param('subscriptionid');
-my $tagslib = &MARCgettagslib( $dbh, 1, $itemtype );
+my $tagslib = &MARCgettagslib($dbh,1,$frameworkcode);
my $record = GetMarcBiblio($biblionumber);
@@ -131,20 +131,16 @@
push @select_fwk, $fwk;
$select_fwk{$fwk} = $description;
}
-$curfwk = $itemtype;
-my $framework = CGI::scrolling_list(
- -name => 'Frameworks',
+$curfwk=$frameworkcode;
+my $framework=CGI::scrolling_list( -name => 'Frameworks',
-id => 'Frameworks',
-default => $curfwk,
-OnChange => 'Changefwk(this);',
-values => address@hidden,
-labels => \%select_fwk,
-size => 1,
- -multiple => 0
-);
-
-$template->param( framework => $framework );
-
+ -multiple => 0 );
+$template->param(framework => $framework);
# fill arrays
my @loop_data = ();
my $tag;
@@ -296,10 +292,8 @@
push( @big_array, \%this_row );
}
}
-my ( $holdingbrtagf, $holdingbrtagsubf ) =
- &MARCfind_marc_from_kohafield( $dbh, "items.holdingbranch", $itemtype );
address@hidden =
- sort { $a->{$holdingbrtagsubf} cmp $b->{$holdingbrtagsubf} } @big_array;
+my ($holdingbrtagf,$holdingbrtagsubf) =
&MARCfind_marc_from_kohafield($dbh,"items.holdingbranch",$frameworkcode);
address@hidden = sort {$a->{$holdingbrtagsubf} cmp $b->{$holdingbrtagsubf}}
@big_array;
#fill big_row with missing datas
foreach my $subfield_code ( keys(%witness) ) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha C4/Biblio.pm catalogue/MARCdetail.pl [rel_3_0],
paul poulain <=