Bugzilla – Attachment 101327 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: Changed logic for checking values
Bug-21503-Changed-logic-for-checking-values.patch (text/plain), 1.35 KB, created by
Fridolin Somers
on 2020-03-21 11:18:11 UTC
(
hide
)
Description:
Bug 21503: Changed logic for checking values
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2020-03-21 11:18:11 UTC
Size:
1.35 KB
patch
obsolete
>From 0856d573982dd9e887242440dce7d2c7bd46be69 Mon Sep 17 00:00:00 2001 >From: Christopher Brannon <cbrannon@cdalibrary.org> >Date: Wed, 17 Oct 2018 21:19:43 +0000 >Subject: [PATCH] Bug 21503: Changed logic for checking values > >Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> >--- > Koha/Template/Plugin/AuthorisedValues.pm | 20 +++++++++++++------- > 1 file changed, 13 insertions(+), 7 deletions(-) > >diff --git a/Koha/Template/Plugin/AuthorisedValues.pm b/Koha/Template/Plugin/AuthorisedValues.pm >index b15136e5b7..57fa3140cf 100644 >--- a/Koha/Template/Plugin/AuthorisedValues.pm >+++ b/Koha/Template/Plugin/AuthorisedValues.pm >@@ -81,13 +81,19 @@ sub GetDescriptionByKohaField { > authorised_value => $params->{authorised_value}, > } > ); >- return %$av >- ? $params->{opac} >- ? $av->{opac_description} >- : $av->{lib} >- : $params->{authorised_value} >- ? $params->{authorised_value} >- : '' >+ my $av_check = $params->{authorised_value}; >+ if ($params->{opac}) { >+ if ($av->{opac_description}) { >+ $av_check = $av->{opac_description} >+ } elsif ($av->{lib}) { >+ $av_check = $av->{lib} >+ } >+ } else { >+ if ($av->{lib}) { >+ $av_check = $av->{lib} >+ } >+ } >+ return $av_check > } > > 1; >-- >2.25.1
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