Bugzilla – Attachment 11125 Details for
Bug 8503
Software error n edit items with EasyAnalyticalRecords
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
Bug-8503-Software-error-in-edit-items-with-EasyAnaly.patch (text/plain), 1.77 KB, created by
Fridolin Somers
on 2012-07-25 12:17:45 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2012-07-25 12:17:45 UTC
Size:
1.77 KB
patch
obsolete
>From 0dab65fed03ea938a0005fda4a5cf34ef9e32dc8 Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Wed, 25 Jul 2012 14:11:08 +0200 >Subject: [PATCH] Bug 8503: Software error in edit items with > EasyAnalyticalRecords > >--- > cataloguing/additem.pl | 17 ++++++++++------- > 1 file changed, 10 insertions(+), 7 deletions(-) > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index 8543297..684e6f6 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -564,13 +564,16 @@ if ( C4::Context->preference('EasyAnalyticalRecords') ) { > $analyticfield = '461'; > } > foreach my $hostfield ($temp->field($analyticfield)){ >- if ($hostfield->subfield('0')){ >- my $hostrecord = GetMarcBiblio($hostfield->subfield('0'), 1); >- my ($itemfield, undef) = GetMarcFromKohaField( 'items.itemnumber', GetFrameworkCode($hostfield->subfield('0')) ); >- foreach my $hostitem ($hostrecord->field($itemfield)){ >- if ($hostitem->subfield('9') eq $hostfield->subfield('9')){ >- push (@fields, $hostitem); >- push (@hostitemnumbers, $hostfield->subfield('9')); >+ my $hostbiblionumber = $hostfield->subfield('0'); >+ if ($hostbiblionumber){ >+ my $hostrecord = GetMarcBiblio($hostbiblionumber, 1); >+ if ($hostrecord) { >+ my ($itemfield, undef) = GetMarcFromKohaField( 'items.itemnumber', GetFrameworkCode($hostbiblionumber) ); >+ foreach my $hostitem ($hostrecord->field($itemfield)){ >+ if ($hostitem->subfield('9') eq $hostfield->subfield('9')){ >+ push (@fields, $hostitem); >+ push (@hostitemnumbers, $hostfield->subfield('9')); >+ } > } > } > } >-- >1.7.9.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8503
:
11125
|
11181