Bugzilla – Attachment 80151 Details for
Bug 21503
Update AuthorisedValues.pm to fall back to code if description doesn't exist
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21503: Fail authorised vaulues better/to code
Bug-21503-Fail-authorised-vaulues-betterto-code.patch (text/plain), 2.04 KB, created by
Christopher Brannon
on 2018-10-05 22:33:18 UTC
(
hide
)
Description:
Bug 21503: Fail authorised vaulues better/to code
Filename:
MIME Type:
Creator:
Christopher Brannon
Created:
2018-10-05 22:33:18 UTC
Size:
2.04 KB
patch
obsolete
>From f8a99aba4b739d64a05eaccd51be6f49d095f24d Mon Sep 17 00:00:00 2001 >From: Christopher Brannon <cbrannon@cdalibrary.org> >Date: Fri, 5 Oct 2018 22:17:05 +0000 >Subject: [PATCH] Bug 21503: Fail authorised vaulues better/to code > >To Test (Test both detail.pl and opac-detail.pl for functionality): >1) Apply patch (restart_all) >2) Look up an item that has a shelving location with a description > defined (opac description too). >3) Remove opac description from shelving location. Refresh > opac-detail.pl and note that description fails back to the > regular description. Refresh detail.pl and note no change. >4) Remove regular description from shelving location. Refresh > opac-detail.pl and detail.pl. Note that both default to the > shelving location code. >5) Remove the shelving location from the LOC table all together. > Refresh opac-detail.pl and detail.pl. Note that both default to a > blank shelving location. >--- > Koha/Template/Plugin/AuthorisedValues.pm | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > >diff --git a/Koha/Template/Plugin/AuthorisedValues.pm b/Koha/Template/Plugin/AuthorisedValues.pm >index 2692c15..0484a81 100644 >--- a/Koha/Template/Plugin/AuthorisedValues.pm >+++ b/Koha/Template/Plugin/AuthorisedValues.pm >@@ -82,12 +82,19 @@ sub GetDescriptionByKohaField { > authorised_value => $params->{authorised_value}, > } > ); >- return %$av >- ? $params->{opac} >+ return $params->{opac} > ? $av->{opac_description} >+ ? $av->{opac_description} >+ : $av->{lib} >+ ? $av->{lib} >+ : $params->{authorised_value} >+ ? $params->{authorised_value} >+ : '' > : $av->{lib} >- : ''; # Maybe we should return $params->{authorised_value}? >- >+ ? $av->{lib} >+ : $params->{authorised_value} >+ ? $params->{authorised_value} >+ : '' > } > > 1; >-- >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 21503
:
80151
|
80152
|
80233
|
80439
|
80521
|
80544
|
80545
|
80558
|
80561
|
80562
|
80563
|
80601
|
80758
|
80759
|
80762
|
101323
|
101324
|
101325
|
101326
|
101327
|
101328
|
101524
|
101525
|
101526
|
101527
|
101528
|
101529
|
101533
|
101534
|
101535