Ignore:
Timestamp:
2012-12-10T16:37:21+13:00 (11 years ago)
Author:
ak19
Message:

When a GS2 collection contains both collect.cfg and collectionConfig.xml (as advanced beatles does) the old code used to end up reading in the GS3 collectionConfig.xml instead of the GS2 collect.cfg and set the GS_mode to GS3. Now colcfg::get_collect_cfg_name takes the gs_mode (instead of determining this and returning it) and works out the collectcfg file name for the gs_mode. That means that the calling functions now need to work out the gs_mode. They do so by setting the gs_mode to gs3 if the site flag is present in the commandline, if not then it defaults to gs2. So from now on, the site flag must be specified for GS3 collections.

File:
1 edited

Legend:

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

    r26536 r26567  
    173173    }
    174174
    175     # set gs_verison 2/3
     175    # set gs_version 2/3
    176176    $self->{'gs_version'} = "2";
    177177    if ((defined $site) && ($site ne "")) {
     
    199199
    200200    # Read in the collection configuration file.
    201     my ($config_filename, $gs_mode) = &colcfg::get_collect_cfg_name($out);
     201    my $gs_mode = "gs".$self->{'gs_version'}; #gs2 or gs3
     202    my $config_filename = &colcfg::get_collect_cfg_name($out, $gs_mode);
    202203    my $collectcfg = &colcfg::read_collection_cfg ($config_filename, $gs_mode);
    203204
Note: See TracChangeset for help on using the changeset viewer.