Bugzilla – Attachment 118110 Details for
Bug 27760
Add handling for x-koha-override
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27760: (QA follow-up) Improve POD
Bug-27760-QA-follow-up-Improve-POD.patch (text/plain), 1.48 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-03-11 11:05:25 UTC
(
hide
)
Description:
Bug 27760: (QA follow-up) Improve POD
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-03-11 11:05:25 UTC
Size:
1.48 KB
patch
obsolete
>From 65a9459af663f0077a5370cc726595f5a34a00c3 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 11 Mar 2021 08:03:13 -0300 >Subject: [PATCH] Bug 27760: (QA follow-up) Improve POD > >This patch improves the POD for the added helper, and also adds >references to the JSON::Validator issue that explains the current >implementation. A FIXME is added for when we upgrade our used >JSON::Validator version. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/REST/Plugin/Query.pm | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > >diff --git a/Koha/REST/Plugin/Query.pm b/Koha/REST/Plugin/Query.pm >index d6ad18dfe11..7e9e0f7d355 100644 >--- a/Koha/REST/Plugin/Query.pm >+++ b/Koha/REST/Plugin/Query.pm >@@ -268,7 +268,19 @@ Merges parameters from $q_params into $filtered_params. > > =head3 stash_overrides > >+ # Stash the overrides > $c->stash_overrides(); >+ #Use it >+ my $overrides = $c->stash('koha.overrides'); >+ if ( $overrides->{pickup_location} ) { ... } >+ >+This helper method parses 'x-koha-override' headers and stashes the passed overriders >+in the for of a I<hashref> for easy use in controller methods. >+ >+FIXME: With the currently used JSON::Validator version we use, it is not possible to >+use the validated and coerced data (it doesn't validate array-type headers) so this >+implementation relies on manual parsing. Look at the JSON::Validator changelog for >+reference: https://metacpan.org/changes/distribution/JSON-Validator#L14 > > =cut > >-- >2.30.2
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 27760
:
117308
|
117309
|
117326
|
117327
|
117342
|
117343
|
117344
|
118108
|
118110
|
120112
|
120113
|
120114
|
120115