http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12151

--- Comment #7 from Jonathan Druart <[email protected]> ---
Comment on attachment 28580
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28580
Bug 12151: Remove uses of smartmatch operator in Search.pm and opac-search.pl

Review of attachment 28580:
 --> 
(http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=12151&attachment=28580)
-----------------------------------------------------------------

::: C4/Search.pm
@@ +533,4 @@
>                                  foreach my $field (@fields) {
>                                      my $data = $field->as_string( 
> $subfield_letters, $facet->{sep} );
>  
> +                                    unless ( any { $data eq $_ } @used_datas 
> ) {

Why don't you use grep?
  unless( grep /^$date$/, @used_datas )

Should do the same without the List::MoreUtils deps.

::: opac/opac-search.pl
@@ +358,4 @@
>  @sort_by = $cgi->param('sort_by');
>  $sort_by[0] = $default_sort_by if !$sort_by[0] && defined($default_sort_by);
>  foreach my $sort (@sort_by) {
> +    if ( any { $sort eq $_ } @allowed_sortby ) {

Same here.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://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