[Koha-bugs] [Bug 31042] OVERRIDE_SYSPREF does not work for REST API

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Sep 21 04:33:13 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31042

--- Comment #10 from David Cook <dcook at prosentient.com.au> ---
So options...

1. 
Like Koha/Middleware/RealIP.pm we could update Koha/Middleware/SetEnv.pm to
work with the %ENV and not just the $env. 

That's probably the shortest path.

2. 
Add code to Koha/REST/V1.pm to update %ENV like
https://metacpan.org/dist/Plack/source/lib/Plack/App/WrapCGI.pm#L48 or another
data structure that could be used by C4::Context->preference

This is probably more logical and not too much longer

--

But really this shows how problematic our use of C4::Context->preference really
is. (It's also why in other bugs I've said that I don't think it's a great idea
for us to embed C4::Context as deeply in Koha modules as we do.)

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list