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

--- Comment #83 from David Cook <[email protected]> ---
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.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to