Changeset 22352

Show
Ignore:
Timestamp:
06.07.2010 13:00:40 (9 years ago)
Author:
kjdon
Message:

remove ex. when generating index lists. Don't want any ex. in build.cfg. This fixes the problem where index list had eg ex.Photographer and collectionmeta in config file had .Photographer and then they didn't match up.

Location:
main/trunk/greenstone2/perllib
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/mgbuilder.pm

    r20418 r22352  
    7777    push (@{$self->{'collect_cfg'}->{'indexes'}}, "dummy:text");     
    7878    } 
    79  
     79    # remove any ex. 
     80    my @orig_indexes = @{$self->{'collect_cfg'}->{'indexes'}}; 
     81    $self->{'collect_cfg'}->{'indexes'} = []; 
     82    foreach my $index (@orig_indexes) { 
     83    $index =~ s/([:,])ex\./$1/g; 
     84    push (@{$self->{'collect_cfg'}->{'indexes'}}, $index); 
     85    } 
    8086} 
    8187 
  • main/trunk/greenstone2/perllib/mgppbuilder.pm

    r20418 r22352  
    101101    if (defined $indexes) { 
    102102    $self->{'collect_cfg'}->{'indexes'} = []; 
    103     push (@{$self->{'collect_cfg'}->{'indexes'}}, join(';', @$indexes).";"); 
     103    my $single_index = join(';', @$indexes).";"; 
     104    # remove any ex. from index spec 
     105    $single_index =~ s/^ex\.//; 
     106    $single_index =~ s/([,;])ex\./$1/g; 
     107    push (@{$self->{'collect_cfg'}->{'indexes'}}, $single_index); 
    104108    } 
    105109}