commit 417553a9e47bf31f4cb785162e3dced856a2ac2a Bug 12478: starting to add search to staff client This commit added code related to the itemtypes to the advanced search, but this code already existed. The weird bit is: $template->param(advancedsearchesloop => \@advancedsearchesloop); my $types = C4::Context->preference("AdvancedSearchTypes") || "itemtypes"; my $advancedsearchesloop = prepare_adv_search_types($types); $template->param(advancedsearchesloop => $advancedsearchesloop); We are passing twice advancedsearchesloop to the template.
Created attachment 107820 [details] [review] Bug 26141: Remove duplicated code from search.pl commit 417553a9e47bf31f4cb785162e3dced856a2ac2a Bug 12478: starting to add search to staff client This commit added code related to the itemtypes to the advanced search, but this code already existed. The weird bit is: $template->param(advancedsearchesloop => \@advancedsearchesloop); my $types = C4::Context->preference("AdvancedSearchTypes") || "itemtypes"; my $advancedsearchesloop = prepare_adv_search_types($types); $template->param(advancedsearchesloop => $advancedsearchesloop); We are passing twice advancedsearchesloop to the template. Test plan (for QA): Review the changes and confirm that we can safely remove this code
Created attachment 107828 [details] [review] Bug 26141: Remove duplicated code from search.pl commit 417553a9e47bf31f4cb785162e3dced856a2ac2a Bug 12478: starting to add search to staff client This commit added code related to the itemtypes to the advanced search, but this code already existed. The weird bit is: $template->param(advancedsearchesloop => \@advancedsearchesloop); my $types = C4::Context->preference("AdvancedSearchTypes") || "itemtypes"; my $advancedsearchesloop = prepare_adv_search_types($types); $template->param(advancedsearchesloop => $advancedsearchesloop); We are passing twice advancedsearchesloop to the template. Test plan (for QA): Review the changes and confirm that we can safely remove this code Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Another one for a straight QA.. I've compared the code and it is indeed a direct clone of the factored out routine directly below it (with a few variables renamed.. moreover the template variable is actually be overwritten by the second call to set it via the factored out return anyway. Safe to remove, Passing QA
Pushed to master for 20.11, thanks to everybody involved!
backported to 20.05.x for 20.05.03
enhancement, not backported to 19.11.x