[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: |
Tumer Garip |
Subject: |
[Koha-cvs] koha/acqui.simple additem.pl [rel_2_2] |
Date: |
Wed, 26 Apr 2006 16:53:37 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: rel_2_2
Changes by: Tumer Garip <address@hidden> 06/04/26 16:53:37
Modified files:
acqui.simple : additem.pl
Log message:
System preference 'itemcallnumber' can now accept 2 subfields like
050ab to accommodate for LC callnumbering. Single subfield implementation not
affected.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui.simple/additem.pl.diff?only_with_tag=rel_2_2&tr1=1.27.2.18&tr2=1.27.2.19&r1=text&r2=text
Patches:
Index: koha/acqui.simple/additem.pl
diff -u koha/acqui.simple/additem.pl:1.27.2.18
koha/acqui.simple/additem.pl:1.27.2.19
--- koha/acqui.simple/additem.pl:1.27.2.18 Tue Mar 21 04:38:14 2006
+++ koha/acqui.simple/additem.pl Wed Apr 26 16:53:37 2006
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: additem.pl,v 1.27.2.18 2006/03/21 04:38:14 kados Exp $
+# $Id: additem.pl,v 1.27.2.19 2006/04/26 16:53:37 tgarip1957 Exp $
# Copyright 2000-2002 Katipo Communications
#
@@ -261,12 +261,16 @@
(C4::Context->userenv->{flags} != 1) &&
($value) && ($value ne C4::Context->userenv->{branch}) ;
# 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')) {
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);
+ $value = ($temp->subfield($CNsubfield)).'
'.($temp->subfield($CNsubfield2));
+#remove any trailing space incase one subfield is used
+ $value=~s/^\s+|\s+$//g;
}
}
if ($tagslib->{$tag}->{$subfield}->{authorised_value}) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha/acqui.simple additem.pl [rel_2_2],
Tumer Garip <=