Changeset 14244 for gsdl/trunk


Ignore:
Timestamp:
2007-07-12T10:42:42+12:00 (17 years ago)
Author:
xiao
Message:

modification to receive the disable_OAI flag directly instead of using the build_cfg structure which might cause perl regular expression compilation warnings.

File:
1 edited

Legend:

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

    r14200 r14244  
    337337    }
    338338
    339     print "*** collectionConfig.xml internal ***\n";
    340     &Display;
     339    #print "*** collectionConfig.xml internal ***\n";
     340    #&Display;
    341341    return $data;
    342342}
     
    350350# Create the buildConfig.xml file for a specific collection
    351351sub write_cfg_file {
    352     # this sub is called make_auxiliary_files() in basebuilder.pm
     352    # this sub is called in make_auxiliary_files() in basebuilder.pm
    353353    # the received args: $buildoutfile - destination file: buildConfig.xml
    354354    #                    $buildcfg - all build options, eg, disable_OAI
    355355    #                    $collectcfg - contents of collectionConfig.xml read in by read_cfg_file sub in cfgread4gs3.pm.
    356     my ($buildoutfile, $buildcfg, $collectcfg) = @_;
     356    my ($buildoutfile, $buildcfg, $collectcfg, $disable_OAI) = @_;
    357357    my $line = [];
    358358
    359359    if (!open (COLCFG, ">$buildoutfile")) {
    360     print STDERR "cfgread::write_cfg_file couldn't write the cfg file $buildoutfile\n";
     360    print STDERR "cfgread4gs3::write_cfg_file couldn't write the build config file $buildoutfile\n";
    361361    die;
    362362    }
     
    391391
    392392    # This serviceRack enables the collection to provide the oai metadata retrieve service, which is served by the OAIPMH.java class
    393     # For each collection, we write the following serviceRack in the collection's buildConfig.xml file as follows if the 'disable_OAI' argument is not ticked in GLI (or equivalently, a 'disable_OAI' flag is not specified on the command line). There are also other configurations in the OAIConfig.xml.
    394     if ($buildcfg->{'disable_OAI'} == 0) {
     393    # For each collection, we write the following serviceRack in the collection's buildConfig.xml file if the 'disable_OAI' argument is not checked in the GLI (or equivalently, a 'disable_OAI' flag is not specified on the command line). There are also other configurations in the OAIConfig.xml.
     394    if ($disable_OAI == 0) {
    395395      &write_line('COLCFG', ["<serviceRack name=\"OAIPMH\">"]);
    396396      if (defined $buildcfg->{'indexstem'}) {
Note: See TracChangeset for help on using the changeset viewer.