[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/acqui.simple additem.pl [dev_week]
From: |
Joshua Ferraro |
Subject: |
[Koha-cvs] koha/acqui.simple additem.pl [dev_week] |
Date: |
Sat, 07 Oct 2006 19:09:09 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: dev_week
Changes by: Joshua Ferraro <kados> 06/10/07 19:09:09
Modified files:
acqui.simple : additem.pl
Log message:
frameworkcode wasn't properly used in additem (and in rel_2_2 the same
problem exists).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/acqui.simple/additem.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.27.2.19.2.6&r2=1.27.2.19.2.7
Patches:
Index: additem.pl
===================================================================
RCS file: /sources/koha/koha/acqui.simple/Attic/additem.pl,v
retrieving revision 1.27.2.19.2.6
retrieving revision 1.27.2.19.2.7
diff -u -b -r1.27.2.19.2.6 -r1.27.2.19.2.7
--- additem.pl 6 Oct 2006 03:10:34 -0000 1.27.2.19.2.6
+++ additem.pl 7 Oct 2006 19:09:09 -0000 1.27.2.19.2.7
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: additem.pl,v 1.27.2.19.2.6 2006/10/06 03:10:34 kados Exp $
+# $Id: additem.pl,v 1.27.2.19.2.7 2006/10/07 19:09:09 kados Exp $
#
# Copyright 2000-2002 Katipo Communications
#
@@ -56,9 +56,9 @@
my $itemnum = $input->param('itemnum');
# find itemtype
-my $itemtype = &MARCfind_frameworkcode($dbh,$bibid);
+my $frameworkcode = &MARCfind_frameworkcode($dbh,$bibid);
-my $tagslib = &MARCgettagslib($dbh,1,$itemtype);
+my $tagslib = &MARCgettagslib($dbh,1,$frameworkcode);
my $record = MARCgetbiblio($dbh,$bibid);
# warn "==>".$record->as_formatted;
my $oldrecord = MARCmarc2koha($dbh,$record);
@@ -135,7 +135,8 @@
$nextop = "additem";
}else{
&DelItem($dbh,$bibid,$itemnum);
- $nextop="additem";
+ print
$input->redirect("additem.pl?bibid=$oldbiblionumber&frameworkcode=$frameworkcode");
+ #$nextop="additem";
}
#------------------------------------------------------------------------------------------------------------------------------
} elsif ($op eq "saveitem") {
@@ -189,8 +190,8 @@
my %witness; #---- stores the list of subfields used at least once, with the
"meaning" of the code
my @big_array;
#---- finds where items.itemnumber is stored
-my ($itemtagfield,$itemtagsubfield) =
&MARCfind_marc_from_kohafield($dbh,"items.itemnumber",$itemtype);
-my ($branchtagfield,$branchtagsubfield) =
&MARCfind_marc_from_kohafield($dbh,"items.homebranch",$itemtype);
+my ($itemtagfield,$itemtagsubfield) =
&MARCfind_marc_from_kohafield($dbh,"items.itemnumber",$frameworkcode);
+my ($branchtagfield,$branchtagsubfield) =
&MARCfind_marc_from_kohafield($dbh,"items.homebranch",$frameworkcode);
foreach my $field (@fields) {
next if ($field->tag()<10);
@@ -229,7 +230,7 @@
$big_array[$i]{$subfield_code}=" " unless
($big_array[$i]{$subfield_code});
}
}
-my ($holdingbrtagf,$holdingbrtagsubf) =
&MARCfind_marc_from_kohafield($dbh,"items.holdingbranch",$itemtype);
+my ($holdingbrtagf,$holdingbrtagsubf) =
&MARCfind_marc_from_kohafield($dbh,"items.holdingbranch",$frameworkcode);
@big_array = sort {$a->{$holdingbrtagsubf} cmp $b->{$holdingbrtagsubf}}
@big_array;
# now, construct template !