Changeset 14112 for trunk/gsdl/perllib/colcfg.pm
- Timestamp:
- 2007-05-30T17:55:36+12:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/colcfg.pm
r14023 r14112 30 30 use cfgread; 31 31 use cfgread4gs3; 32 use gsprintf 'gsprintf'; 32 33 use strict; 33 34 … … 160 161 } 161 162 163 sub get_collect_cfg_name { 164 my ($out) = @_; 165 166 # First check if there's a 167 # gsdl/collect/COLLECTION/custom/COLLECTION/etc/collect.cfg file. This 168 # customization was added for DLC by Stefan, 30/6/2007. 169 my $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "custom", $ENV{'GSDLCOLLECTION'}, "etc", "collect.cfg"); 170 171 if (-e $configfilename) { 172 return ($configfilename, "gs2"); 173 } 174 175 # Now check if there is a collect.cfg file in the usual place, i.e. it is gs2. 176 $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "etc", "collect.cfg"); 177 if (-e $configfilename) { 178 return ($configfilename, "gs2"); 179 } 180 181 # If we get to here we check if there is a collectionConfig.xml file, 182 # i.e. it is gs3. 183 $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "etc", "collectionConfig.xml"); 184 if (-e $configfilename) { 185 return ($configfilename, "gs3"); 186 } 187 188 # Error. No collection configuration file. 189 (&gsprintf($out, "{common.cannot_find_cfg_file}\n", $configfilename) && die); 190 } 191 162 192 1; 163 193
Note:
See TracChangeset
for help on using the changeset viewer.