Bugzilla – Attachment 8134 Details for
Bug 6875
de-nesting C4 packages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6875 Followup: De-nesting C4::Items breaks bulkmarcimport
Bug-6875-Followup-De-nesting-C4Items-breaks-bulkma.patch (text/plain), 2.24 KB, created by
Jared Camins-Esakov
on 2012-03-10 13:41:35 UTC
(
hide
)
Description:
Bug 6875 Followup: De-nesting C4::Items breaks bulkmarcimport
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-03-10 13:41:35 UTC
Size:
2.24 KB
patch
obsolete
>From ed63ea9f8e17a7cec272244a8abb50d5c392756d Mon Sep 17 00:00:00 2001 >From: Ian Walls <koha.sekjal@gmail.com> >Date: Sat, 10 Mar 2012 08:02:26 -0500 >Subject: [PATCH] Bug 6875 Followup: De-nesting C4::Items breaks bulkmarcimport >Content-Type: text/plain; charset="UTF-8" > >Removing 'use C4::Branch' in favour of a subroutine-specific 'require C4::Branch' >causes the GetBranchName subroutine to return an error, as it's not defined >in C4::Items. Adding "C4::Branch::" scoping fixes the error, which is what's done here. > >To confirm problem: >1. Attempt to run bulkmarcimport.pl before applying the patch. You should get > ERROR: Adding items to bib 435 failed: Undefined subroutine &C4::Items::GetBranchName > called at /home/sekjal/kohaclone/C4/Items.pm line 656, <GEN13> line 435. > >To test: >2. apply patch >3. run bulkmarcimport again. Error should disappear. > >Signed-off-by: Ian Walls <koha.sekjal@gmail.com> >Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> >Note that this problem only appears when importing records with item (952) >fields. >--- > C4/Items.pm | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index b257e52..676c91b 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -653,7 +653,7 @@ sub CheckItemPreSave { > > # check for valid home branch > if (exists $item_ref->{'homebranch'} and defined $item_ref->{'homebranch'}) { >- my $branch_name = GetBranchName($item_ref->{'homebranch'}); >+ my $branch_name = C4::Branch::GetBranchName($item_ref->{'homebranch'}); > unless (defined $branch_name) { > # relies on fact that branches.branchname is a non-NULL column, > # so GetBranchName returns undef only if branch does not exist >@@ -663,7 +663,7 @@ sub CheckItemPreSave { > > # check for valid holding branch > if (exists $item_ref->{'holdingbranch'} and defined $item_ref->{'holdingbranch'}) { >- my $branch_name = GetBranchName($item_ref->{'holdingbranch'}); >+ my $branch_name = C4::Branch::GetBranchName($item_ref->{'holdingbranch'}); > unless (defined $branch_name) { > # relies on fact that branches.branchname is a non-NULL column, > # so GetBranchName returns undef only if branch does not exist >-- >1.7.2.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 6875
:
5442
|
5443
|
5496
|
5497
|
5498
|
5499
|
5500
|
5501
|
5502
|
5503
|
5504
|
5505
|
5506
|
5507
|
5508
|
5509
|
5510
|
5511
|
5512
|
7359
|
7360
|
7361
|
7362
|
7363
|
7364
|
7365
|
7652
|
7654
|
7655
|
7656
|
7657
|
7658
|
7770
|
7771
|
7808
|
7844
|
8095
|
8133
|
8134
|
8135