Adding some fixing for NoZebra

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
This commit is contained in:
Henri-Damien LAURENT 2008-08-12 09:28:16 +02:00
parent 8d82c2cd6b
commit 57f53d05d5
1 changed files with 2 additions and 4 deletions

6
C4/Biblio.pm Normal file → Executable file
View File

@ -2195,13 +2195,11 @@ sub ModZebra {
sub GetNoZebraIndexes {
my $index = C4::Context->preference('NoZebraIndexes');
my %indexes;
foreach my $line (split /('|"),/,$index) {
foreach my $line (split /('|"),[\n\r]*/,$index) {
$line =~ /(.*)=>(.*)/;
my $index = substr($1,1); # get the index, don't forget to remove initial ' or "
my $index = $1; # initial ' or " is removed afterwards
my $fields = $2;
$index =~ s/'|"|\s//g;
$fields =~ s/'|"|\s//g;
$indexes{$index}=$fields;
}