Ignore:
Timestamp:
2012-05-25T17:35:53+12:00 (12 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.