Browse Source

Bug 17661: Trivial simplification using += operator

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
20.11.x
Jonathan Druart 11 months ago
parent
commit
c96fabb8c4
  1. 2
      C4/Search.pm

2
C4/Search.pm

@ -781,7 +781,7 @@ sub _get_facet_from_result_set {
my $facet_value = $term->textContent;
$facet_value =~ s/\s*(?<!\p{Uppercase})[.\-,;]*\s*$//;
$facet_value =~ s/\Q$internal_sep\E/$sep/ if defined $sep;
$facets->{ $facet_value } = ( defined $facets->{$facet_value} ) ? $facets->{ $facet_value } + $term->getAttribute( 'occur' ) : $term->getAttribute( 'occur' );
$facets->{ $facet_value } += $term->getAttribute( 'occur' );
}
return $facets;

Loading…
Cancel
Save