[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/acqui.simple additem.pl [rel_2_2]
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] koha/acqui.simple additem.pl [rel_2_2] |
Date: |
Tue, 12 Sep 2006 09:11:45 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: rel_2_2
Changes by: Henri-Damien LAURENT <hdl> 06/09/12 09:11:45
Modified files:
acqui.simple : additem.pl
Log message:
BUG FIXING :
Add items with IndependatBranches On was possibly get into trouble
using a $0 value.
And frameworks used were those from itemtype instead of Bibliographic
Record. May be considered as a feature provided that An itemtyp has only One
framework attached.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/acqui.simple/additem.pl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.27.2.21&r2=1.27.2.22
Patches:
Index: additem.pl
===================================================================
RCS file: /sources/koha/koha/acqui.simple/Attic/additem.pl,v
retrieving revision 1.27.2.21
retrieving revision 1.27.2.22
diff -u -b -r1.27.2.21 -r1.27.2.22
--- additem.pl 20 Jun 2006 18:22:23 -0000 1.27.2.21
+++ additem.pl 12 Sep 2006 09:11:45 -0000 1.27.2.22
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: additem.pl,v 1.27.2.21 2006/06/20 18:22:23 oleonard Exp $
+# $Id: additem.pl,v 1.27.2.22 2006/09/12 09:11:45 hdl Exp $
# Copyright 2000-2002 Katipo Communications
#
@@ -189,8 +189,9 @@
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 $fwkcode = MARCfind_frameworkcode($dbh,$bibid);
+my ($itemtagfield,$itemtagsubfield) =
&MARCfind_marc_from_kohafield($dbh,"items.itemnumber",$fwkcode);
+my ($branchtagfield,$branchtagsubfield) =
&MARCfind_marc_from_kohafield($dbh,"items.homebranch",$fwkcode);
foreach my $field (@fields) {
next if ($field->tag()<10);
@@ -210,7 +211,7 @@
$this_row{$subf[$i][0]}=get_authorised_value_desc($field->tag(), $subf[$i][0],
$subf[$i][1], '', $dbh);
}
}
- if (($field->tag eq $branchtagfield) && ($subf[$i][$0] eq
$branchtagsubfield) && C4::Context->preference("IndependantBranches")) {
+ if (($field->tag eq $branchtagfield) && ($subf[$i][0] eq
$branchtagsubfield) && C4::Context->preference("IndependantBranches")) {
#verifying rights
my $userenv = C4::Context->userenv;
unless (($userenv->{'flags'} == 1) or
(($userenv->{'branch'} eq $subf[$i][1]))){
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha/acqui.simple additem.pl [rel_2_2],
Henri-Damien LAURENT <=