X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=admin%2Fpreferences.pl;h=09d648f8c40ff8ff6fcc5b221b21da0e29a16045;hb=9bc53a0fccc3b673dca43791ebfcb53fd6e0a9ee;hp=2182591f29cb2293d41b7cf238572d2232b9b1c3;hpb=9c0b2e408b496b999cdbede92e651f3aef588209;p=koha-ffzg.git diff --git a/admin/preferences.pl b/admin/preferences.pl index 2182591f29..09d648f8c4 100755 --- a/admin/preferences.pl +++ b/admin/preferences.pl @@ -21,7 +21,6 @@ use strict; use warnings; use CGI; - use C4::Auth; use C4::Context; use C4::Koha; @@ -35,7 +34,6 @@ use File::Spec; use IO::File; use YAML::Syck qw(); $YAML::Syck::ImplicitTyping = 1; -$YAML::Syck::ImplicitUnicode = 1; # force utf-8 for preference encoding our $lang; # use Smart::Comments; @@ -218,12 +216,10 @@ sub SearchPrefs { foreach my $piece ( @$line ) { if ( ref( $piece ) eq 'HASH' ) { - if ( !$piece->{'pref'} ){ next; } - if ( $piece->{'pref'} =~ /^$searchfield$/i ) { - my ( undef, $LINES ) = TransformPrefsToHTML( $data, $searchfield ); - - return { search_jumped => 1, tab => $tab_name, tab_title => $title, LINES => $LINES }; - } elsif ( matches( $piece->{'pref'}, \@terms) ) { + if ( !$piece->{'pref'} ){ + next; + } + if ( matches( $piece->{'pref'}, \@terms) ) { $matched = 1; } elsif ( ref( $piece->{'choices'} ) eq 'HASH' && grep( { $_ && matches( $_, \@terms ) } values( %{ $piece->{'choices'} } ) ) ) { $matched = 1; @@ -297,8 +293,7 @@ if ( $op eq 'save' ) { my @TABS; if ( $op eq 'search' ) { - my $searchfield = $input->param('searchfield'); - utf8::decode($searchfield); + my $searchfield = $input->param( 'searchfield' ); $searchfield =~ s/\p{IsC}//g; $searchfield =~ s/\s+/ /;