reserve/request.pl sets SuspendHoldsIntranet and AutoResumeSuspendedHolds template parameters which are not used in any templates or template includes. Those should be removed.
Created attachment 140199 [details] [review] Bug 31519: Remove unused SuspendHoldsIntranet and AutoResumeSuspendedHolds variables If you grep koha-tmpl/intranet-tmpl/prog/en for those you will see there are no references for those.
Created attachment 140200 [details] [review] Bug 31519: Move preference fetching directly to be done in the template Since we are not in a loop or using this multiple times it's simple to do it this way, helps with changing the template code in the future too since if we want to remove this syspref variable we know it is only used in this one particular place. To test: 1) Grep for reserve_in_future and make sure there are no matches after applying this patch
Created attachment 140741 [details] [review] Bug 31519: Remove unused SuspendHoldsIntranet and AutoResumeSuspendedHolds variables If you grep koha-tmpl/intranet-tmpl/prog/en for those you will see there are no references for those. Signed-off-by: David Nind <david@davidnind.com>
Created attachment 140742 [details] [review] Bug 31519: Move preference fetching directly to be done in the template Since we are not in a loop or using this multiple times it's simple to do it this way, helps with changing the template code in the future too since if we want to remove this syspref variable we know it is only used in this one particular place. To test: 1) Grep for reserve_in_future and make sure there are no matches after applying this patch Signed-off-by: David Nind <david@davidnind.com>
Have signed off, but noted that there are two occurrences after running git grep reserve_in_future that relate to the OPAC: root@kohadevbox:koha(bz31519)$ git grep reserve_in_future koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt: [% IF ( reserve_in_future ) %] opac/opac-reserve.pl: reserve_in_future => 1, I'm assuming that's because this bug is only making changes to the staff interface.
Created attachment 141534 [details] [review] Bug 31519: Remove unused SuspendHoldsIntranet and AutoResumeSuspendedHolds variables If you grep koha-tmpl/intranet-tmpl/prog/en for those you will see there are no references for those. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 141535 [details] [review] Bug 31519: Move preference fetching directly to be done in the template Since we are not in a loop or using this multiple times it's simple to do it this way, helps with changing the template code in the future too since if we want to remove this syspref variable we know it is only used in this one particular place. To test: 1) Grep for reserve_in_future and make sure there are no matches after applying this patch Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 22.11. Nice work everyone, thanks!