Changeset 17574

Show
Ignore:
Timestamp:
23.10.2008 10:00:34 (11 years ago)
Author:
kjdon
Message:

now calls read_build_cfg() instead of having the code here

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/mgppbuilder.pm

    r17565 r17574  
    719719     
    720720    #add all fields bit  
     721    my $ifm = $self->{'buildproc'}->{'indexfieldmap'}; 
     722     
    721723    foreach $field (@specifiedfieldorder) { 
    722724    if ($field eq "metadata") { 
     
    735737        push (@indexfields, "allfields"); 
    736738    } else { 
    737  
    738         my $ifm = $self->{'buildproc'}->{'indexfieldmap'}; 
    739  
     739        # we only add in the ones that have been processed 
    740740        if (defined $ifm->{$field}) { 
    741741        push (@indexfieldmap, "$field\-\>$ifm->{$field}"); 
     
    763763    my @indexmap = (); 
    764764 
    765     #if (scalar(keys %{$self->{'buildproc'}->{'indexfieldmap'}}) == 0) { 
    766     # set the default mapping 
    767     #$self->{'buildproc'}->set_indexfieldmap ($self->{'indexfieldmap'}); 
    768     #} 
    769765    # we read the stuff in from the build.cfg file - if its there 
    770     my $buildconfigfile = &util::filename_cat($self->{'build_dir'}, "build.cfg"); 
    771      
    772     if (!-e $buildconfigfile) { 
    773     # try the index dir - but do we know where it is?? try here 
    774     $buildconfigfile  = &util::filename_cat($ENV{'GSDLCOLLECTDIR'}, "index", "build.cfg"); 
    775     if (!-e $buildconfigfile) { 
    776         #we cant find a config file - just ignore the field list 
    777         return; 
    778     } 
    779     }  
    780  
    781     my $buildcfg = &colcfg::read_build_cfg( $buildconfigfile); 
     766    my $buildcfg = $self->read_build_cfg(); 
     767    return unless defined $buildcfg; 
     768 
    782769    my $field; 
    783770    if (defined $buildcfg->{'indexfields'}) {