Bug 26845

Summary: Refactor get_template_and_user
Product: Koha Reporter: David Cook <dcook>
Component: Architecture, internals, and plumbingAssignee: Bugs List <koha-bugs>
Status: CLOSED WONTFIX QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27342
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description David Cook 2020-10-28 13:19:09 UTC
C4::Auth::get_template_and_user is a terrifyingly large function that does way too many things, and it's a complete mess.

Many of the $template->param interactions are just setting system preferences. We shouldn't even need to do that anymore.
Comment 1 David Cook 2020-12-22 06:21:20 UTC
I don't think we're going to ever fix it, so I think the only real hope is to eventually replace it via Bug 26791 or equivalent.