Bugzilla – Attachment 11078 Details for
Bug 8434
Notice generation fails for Advanced Notices, Item Due, and Overdues when run in shell (due to error in Letters.pm)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 8434 - Notice generation fails for Advanced Notices, Item Due, and Overdues when run in shell (due to error in Letters.pm)
0001-Bug-8434-Notice-generation-fails-for-Advanced-Notice.patch (text/plain), 1.20 KB, created by
Jonathan Druart
on 2012-07-23 11:58:19 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 8434 - Notice generation fails for Advanced Notices, Item Due, and Overdues when run in shell (due to error in Letters.pm)
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2012-07-23 11:58:19 UTC
Size:
1.20 KB
patch
obsolete
>From 29e70ef3d3055e199de1dfbfe583e9114d6407fc Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Fri, 13 Jul 2012 11:50:04 +1000 >Subject: [PATCH 1/1] Bug 8434 - Notice generation fails for Advanced Notices, > Item Due, and Overdues when run in shell (due to error > in Letters.pm) > >Patch introduces a check for C4::Context->userenv in Letters.pm, so that script doesn't fail when it calls to C4::Context->userenv->{branch}, when run from shell. > >Without the check, Advanced Notices, Item Due, and Overdues fail to generate. > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Letters.pm | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index b366fbc..b17cb08 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -120,7 +120,9 @@ my %letter; > sub getletter { > my ( $module, $code, $branchcode ) = @_; > >- if (C4::Context->preference('IndependantBranches') && $branchcode){ >+ if ( C4::Context->preference('IndependantBranches') >+ and $branchcode >+ and C4::Context->userenv ) { > $branchcode = C4::Context->userenv->{'branch'}; > } > >-- >1.7.7.3 >
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 8434
:
10805
|
10806
|
10831
| 11078