Bugzilla – Attachment 66525 Details for
Bug 14385
Extend OpacHiddenItems to allow specifying exempt borrower categories
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 14385: Tweaks so t/db_dependent/00-strict.t passes
SIGNED-OFF-Bug-14385-Tweaks-so-tdbdependent00-stri.patch (text/plain), 2.15 KB, created by
Aleisha Amohia
on 2017-08-27 23:41:32 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 14385: Tweaks so t/db_dependent/00-strict.t passes
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2017-08-27 23:41:32 UTC
Size:
2.15 KB
patch
obsolete
>From 505b84ec6b770cf35333499d656ba9cd9c2e2e12 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 27 Jun 2017 22:52:21 -0400 >Subject: [PATCH] [SIGNED-OFF] Bug 14385: Tweaks so t/db_dependent/00-strict.t > passes > >There was a typo botcat vs borcat and borrowernumber was never >defined. Grabbing from userenv, like other code does. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> >--- > opac/opac-ISBDdetail.pl | 4 ++++ > opac/opac-MARCdetail.pl | 6 +++++- > 2 files changed, 9 insertions(+), 1 deletion(-) > >diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl >index 9b5bc3a..fdb82f5 100755 >--- a/opac/opac-ISBDdetail.pl >+++ b/opac/opac-ISBDdetail.pl >@@ -85,7 +85,11 @@ my $marcflavour = C4::Context->preference("marcflavour"); > > my @items = GetItemsInfo($biblionumber); > if (scalar @items >= 1) { >+ my $borrowernumber; > my $borcat; >+ if (C4::Context->userenv) { >+ $borrowernumber = C4::Context->userenv->{'number'}; >+ } > if ( C4::Context->preference('OpacHiddenItemsExceptions') ) { > > # we need to fetch the borrower info here, so we can pass the category >diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl >index 4e40f41..39a4dbf 100755 >--- a/opac/opac-MARCdetail.pl >+++ b/opac/opac-MARCdetail.pl >@@ -82,14 +82,18 @@ if ( ! $record ) { > my @all_items = GetItemsInfo($biblionumber); > my @items2hide; > if (scalar @all_items >= 1) { >+ my $borrowernumber; > my $borcat; >+ if (C4::Context->userenv) { >+ $borrowernumber = C4::Context->userenv->{'number'}; >+ } > if ( C4::Context->preference('OpacHiddenItemsExceptions') ) { > > # we need to fetch the borrower info here, so we can pass the category > my $borrower = GetMember( borrowernumber => $borrowernumber ); > $borcat = $borrower->{categorycode}; > } >- push @items2hide, GetHiddenItemnumbers({ items => \@all_items, borcat => $botcat }); >+ push @items2hide, GetHiddenItemnumbers({ items => \@all_items, borcat => $borcat }); > > if (scalar @items2hide == scalar @all_items ) { > print $query->redirect("/cgi-bin/koha/errors/404.pl"); >-- >2.1.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 14385
:
40158
|
53483
|
53494
|
53505
|
53506
|
53507
|
55593
|
64688
|
64689
|
64690
|
64691
|
64692
|
64693
|
65322
|
65323
|
65324
|
65325
|
65376
|
65377
|
65378
|
65379
|
65380
|
65381
|
65382
|
65383
|
65384
|
65385
|
65386
|
65387
|
65388
|
65389
|
65408
|
65409
|
65410
|
65411
|
66103
|
66104
|
66105
|
66106
|
66107
|
66108
|
66109
|
66110
|
66111
|
66112
|
66113
|
66114
|
66115
|
66116
|
66117
|
66118
|
66125
|
66126
|
66127
|
66128
|
66129
|
66130
|
66131
|
66132
|
66192
|
66193
|
66194
|
66195
|
66196
|
66197
|
66198
|
66199
|
66200
|
66201
|
66202
|
66203
|
66204
|
66205
|
66206
|
66207
|
66208
|
66209
|
66210
|
66302
|
66303
|
66347
|
66361
|
66372
|
66401
|
66403
|
66520
|
66521
|
66522
|
66523
|
66524
|
66525
|
66526
|
66527
|
66528
|
66529
|
66530
|
66531
|
66532
|
66533
|
66534
|
66535
|
66536
|
66537
|
66538
|
66539
|
66540
|
66541
|
66542
|
66543
|
66544
|
66545
|
70256
|
70257
|
70258
|
70259
|
72445
|
72446
|
72447
|
72448
|
72449
|
72450
|
72451
|
72452
|
72453
|
72454
|
74001
|
78654
|
78655
|
78656
|
78657
|
78825
|
78826
|
78827
|
78828
|
80411
|
80463
|
80464
|
80465
|
80466
|
80467
|
89963
|
90038