Bugzilla – Attachment 64976 Details for
Bug 17829
Move GetMember to Koha::Patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17829: Update CanUserManageBasket to fix tests
Bug-17829-Update-CanUserManageBasket-to-fix-tests.patch (text/plain), 1.81 KB, created by
Jonathan Druart
on 2017-07-10 17:18:36 UTC
(
hide
)
Description:
Bug 17829: Update CanUserManageBasket to fix tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-07-10 17:18:36 UTC
Size:
1.81 KB
patch
obsolete
>From 97b0fffad680917e37d1aeb81b3a3616c0523177 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 10 Jul 2017 14:18:12 -0300 >Subject: [PATCH] Bug 17829: Update CanUserManageBasket to fix tests > >--- > C4/Acquisition.pm | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index ee382853aa..346fb4546c 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -823,7 +823,10 @@ sub CanUserManageBasket { > my ($borrower, $basket, $userflags) = @_; > > if (!ref $borrower) { >- $borrower = Koha::Patrons->find( $borrower ); >+ # FIXME This needs to be replaced >+ # We should not accept both scalar and array >+ # Tests need to be updated >+ $borrower = Koha::Patrons->find( $borrower )->unblessed; > } > if (!ref $basket) { > $basket = GetBasket($basket); >@@ -831,7 +834,7 @@ sub CanUserManageBasket { > > return 0 unless ($basket and $borrower); > >- my $borrowernumber = $borrower->borrowernumber; >+ my $borrowernumber = $borrower->{borrowernumber}; > my $basketno = $basket->{basketno}; > > my $AcqViewBaskets = C4::Context->preference('AcqViewBaskets'); >@@ -843,7 +846,7 @@ sub CanUserManageBasket { > my ($flags) = $sth->fetchrow_array; > $sth->finish; > >- $userflags = C4::Auth::getuserflags($flags, $borrower->userid, $dbh); >+ $userflags = C4::Auth::getuserflags($flags, $borrower->{userid}, $dbh); > } > > unless ($userflags->{superlibrarian} >@@ -866,7 +869,7 @@ sub CanUserManageBasket { > } > > if ($AcqViewBaskets eq 'branch' && defined $basket->{branch} >- && $basket->{branch} ne $borrower->branchcode) { >+ && $basket->{branch} ne $borrower->{branchcode}) { > return 0; > } > } >-- >2.11.0
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 17829
:
64872
|
64873
|
64971
|
64972
|
64973
| 64976 |
65002
|
65213
|
65286
|
65549
|
65778
|
66360
|
68634