[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: |
Antoine Farnault |
Subject: |
[Koha-cvs] koha/acqui.simple additem.pl [rel_2_2] |
Date: |
Wed, 28 Feb 2007 09:09:30 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: rel_2_2
Changes by: Antoine Farnault <toins> 07/02/28 09:09:30
Modified files:
acqui.simple : additem.pl
Log message:
reporting bug fix from 2.2.7.1 to 2.2.7.
LOG was :
BUGFIX (minor) : when itemcallnumber systempref is set,
after adding/modifying an item, the default automatic itemcallnumber was not
calculated, due to multiple use of $temp variable.
Quick & dirty fix, should probably be better to rewrite this
code...
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.22&r2=1.27.2.23
Patches:
Index: additem.pl
===================================================================
RCS file: /sources/koha/koha/acqui.simple/Attic/additem.pl,v
retrieving revision 1.27.2.22
retrieving revision 1.27.2.23
diff -u -b -r1.27.2.22 -r1.27.2.23
--- additem.pl 12 Sep 2006 09:11:45 -0000 1.27.2.22
+++ additem.pl 28 Feb 2007 09:09:30 -0000 1.27.2.23
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: additem.pl,v 1.27.2.22 2006/09/12 09:11:45 hdl Exp $
+# $Id: additem.pl,v 1.27.2.23 2007/02/28 09:09:30 toins Exp $
# Copyright 2000-2002 Katipo Communications
#
@@ -284,13 +284,14 @@
# print $input->redirect(".pl?bibid=$bibid") if ($test);
# search for itemcallnumber if applicable
##Lc callnumbers expect 2 subfields like 050ab or 090ab . Modified to accept 2
subfields
- if ($tagslib->{$tag}->{$subfield}->{kohafield} eq
'items.itemcallnumber' && C4::Context->preference('itemcallnumber')) {
+warn "$value / $tag / $subfield";
+ if (!$value && $tagslib->{$tag}->{$subfield}->{kohafield} eq
'items.itemcallnumber' && C4::Context->preference('itemcallnumber')) {
my $CNtag =
substr(C4::Context->preference('itemcallnumber'),0,3);
my $CNsubfield =
substr(C4::Context->preference('itemcallnumber'),3,1);
my $CNsubfield2 =
substr(C4::Context->preference('itemcallnumber'),4,1);
- my $temp = $record->field($CNtag);
- if ($temp) {
- $value = ($temp->subfield($CNsubfield)).'
'.($temp->subfield($CNsubfield2));
+ my $temp2 = $temp->field($CNtag);
+ if ($temp2) {
+ $value = ($temp2->subfield($CNsubfield)).'
'.($temp2->subfield($CNsubfield2));
#remove any trailing space incase one subfield is used
$value=~s/^\s+|\s+$//g;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha/acqui.simple additem.pl [rel_2_2],
Antoine Farnault <=