Changeset 25677


Ignore:
Timestamp:
2012-05-25T17:35:53+12:00 (9 years ago)
Author:
ak19
Message:

colcfg.pm tests for collectionConfig before testing for collect.cfg to work out the Greenstone version being used (GS2 or GS3). This change was necessary when activating collections that have been converted from GS2 to GS3.

Location:
main/trunk/greenstone2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/activate.pl

    r25676 r25677  
    516516    }
    517517   
    518     # gs_mode is set to gs2 if there's a collect.cfg and regardless of whether there's a collectionConfig.xml
    519     # (this happens especially when a GS2 collection is being converted to GS3).
    520     # override this behaviour here, by looking for whether a site variable was passed in
    521     if(defined $site && $gs_mode eq "gs2") {
    522     $gs_mode="gs3";
    523     }   
    524 
    525518    # Now the logic in GLI's CollectionManager.java (processComplete()
    526519    # and installCollection()) and Gatherer.configGS3Server().
  • main/trunk/greenstone2/perllib/colcfg.pm

    r24754 r25677  
    273273    }
    274274
    275     # Now check if there is a collect.cfg file in the usual place, i.e. it is gs2.
     275    # Check if there is a collectionConfig.xml file. If there is one, it's gs3
     276    $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "etc", "collectionConfig.xml");   
     277    if (-e $configfilename) {
     278        return ($configfilename, "gs3");
     279    }
     280
     281    # If we get to here we check if there is a collect.cfg file in the usual place, i.e. it is gs2.
    276282    $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "etc", "collect.cfg");
    277283    if (-e $configfilename) {
    278284        return ($configfilename, "gs2");
    279     }
    280 
    281     # If we get to here we check if there is a collectionConfig.xml file,
    282     # i.e. it is gs3.
    283     $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "etc", "collectionConfig.xml");   
    284     if (-e $configfilename) {
    285         return ($configfilename, "gs3");
    286285    }
    287286
Note: See TracChangeset for help on using the changeset viewer.