https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16631 --- Comment #83 from David Cook <dcook@prosentient.com.au> --- Comment on attachment 186633 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186633 0002-Bug-16631-Institute-library-limits-1 Review of attachment 186633: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=16631&attachment=186633) ----------------------------------------------------------------- ::: Koha/Reports.pm @@ +33,4 @@
=cut
+=head3 search_with_localization
This function doesn't appear to be used in Koha? Could you clarify its purpose? ::: reports/guided_reports.pl @@ +87,5 @@
+if ( defined $input->param('show_all') ) { + my $param = $input->param('show_all'); + if ( defined $param && $param eq '1' ) { + $show_all = 1; + $session->param( 'show_all', 1 ) if $session;
Since the session is for the whole of Koha, it would be wise to prefix this session parameter key with something like "reports_". That being said, generally speaking we don't use the Koha database session for sticky view settings. This would probably be done better using localStorage or a cookie I would think. Alternatively, I'm not sure it's really necessary for this to be sticky either? @@ +1115,5 @@
my $subgroup = $input->param('subgroup'); $filter->{group} = $group; $filter->{subgroup} = $subgroup; + + my $pref_limit_reports_by_branch = C4::Context->preference("LimitReportsByBranch");
This block seems like it has quite a bit of copy/paste. Ideally we shouldn't be repeating code unnecessarily. The unique conditional code could be done above the repeated part, or you could move the repeated part into a function and call it twice. -- You are receiving this mail because: You are watching all bug changes.