Bugzilla – Attachment 41847 Details for
Bug 14709
The export tool is broken if used from the command line
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch fixes the bug. I don't see any side effects caused by the fix.
Bug-14709-Do-not-access-to-C4Context-userenv-from-.patch (text/plain), 1.31 KB, created by
Joonas Kylmälä
on 2015-08-24 12:35:33 UTC
(
hide
)
Description:
Patch fixes the bug. I don't see any side effects caused by the fix.
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2015-08-24 12:35:33 UTC
Size:
1.31 KB
patch
obsolete
>From 43f86d6443f343f734d4f4a9dc28ad16c6507ec1 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 24 Aug 2015 10:07:37 +0100 >Subject: [PATCH] Bug 14709: Do not access to C4::Context->userenv from the > commandline >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The script dies with > Can't use an undefined value as a HASH reference at tools/export.pl >line 149. >if it is called from the command line. > >This is introduced by bug 13040. > >The C4::Context->userenv is not defined in this case. > >Test plan: >Execute the script using the command line. >With the patch applies you should not get the error. > >Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com> >--- > tools/export.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/tools/export.pl b/tools/export.pl >index f63e2c4..93b9fac 100755 >--- a/tools/export.pl >+++ b/tools/export.pl >@@ -146,7 +146,7 @@ if ( C4::Context->preference("IndependentBranches") > @branch = ( C4::Context->userenv->{'branch'} ); > } > # if stripping nonlocal items, use loggedinuser's branch >-my $localbranch = C4::Context->userenv->{'branch'}; >+my $localbranch = C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef; > > my %branchmap = map { $_ => 1 } @branch; # for quick lookups > >-- >1.9.1
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 14709
:
41818
|
41847
|
42185