Bugzilla – Attachment 5966 Details for
Bug 6390
Basket only visible for librarian who created it
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 6390 Followup: Basket's authorisedby might not be a borrowernumber
SIGNED-OFF-Bug-6390-Followup-Baskets-authorisedby-.patch (text/plain), 1.87 KB, created by
Katrin Fischer
on 2011-10-18 20:51:39 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 6390 Followup: Basket's authorisedby might not be a borrowernumber
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2011-10-18 20:51:39 UTC
Size:
1.87 KB
patch
obsolete
>From 1d14c72fce8cb80032bd514fd5a2e6db3cda58aa Mon Sep 17 00:00:00 2001 >From: Ian Walls <ian.walls@bywatersolutions.com> >Date: Tue, 18 Oct 2011 16:13:15 -0400 >Subject: [PATCH] [SIGNED-OFF] Bug 6390 Followup: Basket's authorisedby might > not be a borrowernumber > >aqbasket.authorisedby is not foreign key constrainted to borrowers.borrowernumber, >so if it's anything other than that, vendor search breaks by using an undefined value >(GetMember() on an invalid borrowernumber) as a HASH ref. > >This patch sets the branchcode (the desired value from GetMember) to a blank value, then only >changes it if GetMember is defined. In the case where the authorisedby librarian has been deleted, >or the value is otherwise invalid, and AcqViewBaskets is set to 'branch', the basket will not appear >except to superlibrarians > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Invalid borrowernumber in aqbasket.authorisedby no longer breaks search. >--- > acqui/booksellers.pl | 6 +++++- > 1 files changed, 5 insertions(+), 1 deletions(-) > >diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl >index 2b16fe4..634eb93 100755 >--- a/acqui/booksellers.pl >+++ b/acqui/booksellers.pl >@@ -111,7 +111,11 @@ for my $vendor (@suppliers) { > > for my $basket ( @{$baskets} ) { > my $authorisedby = $basket->{authorisedby}; >- my $basketbranch = GetMember( borrowernumber => $authorisedby )->{branchcode}; >+ my $basketbranch = ''; # set a blank branch to start with >+ if ( GetMember( borrowernumber => $authorisedby ) ) { >+ # authorisedby may not be a valid borrowernumber; it's not foreign-key constrained! >+ $basketbranch = GetMember( borrowernumber => $authorisedby )->{branchcode}; >+ } > > if ($userenv->{'flags'} & 1 || #user is superlibrarian > (haspermission( $uid, { acquisition => q{*} } ) && #user has acq permissions and >-- >1.7.5.4
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 6390
:
4778
|
4782
|
4853
|
5323
|
5324
|
5461
|
5462
|
5463
|
5464
|
5518
|
5802
|
5862
|
5863
|
5935
|
5963
| 5966