Changeset 26567 for main/trunk
- Timestamp:
- 2012-12-10T16:37:21+13:00 (11 years ago)
- Location:
- main/trunk/greenstone2
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/activate.pl
r25896 r26567 488 488 # Beware: Only if $site is specified in the cmdline does collectionConfig.xml get 489 489 # generated and does $gs_mode=gs3, else collect.cfg gets generated and $gs_mode=gs2 490 my ($collect_cfg_filename, $gs_mode) = &colcfg::get_collect_cfg_name(STDERR); 490 my $gs_mode = "gs2"; 491 if ((defined $site) && ($site ne "")) { # GS3 492 $gs_mode = "gs3"; 493 } 494 my $collect_cfg_filename = &colcfg::get_collect_cfg_name(STDERR, $gs_mode); 491 495 my $collectcfg = &colcfg::read_collection_cfg ($collect_cfg_filename,$gs_mode); 492 496 -
main/trunk/greenstone2/bin/script/buildcol.pl
r25896 r26567 386 386 # Read in the collection configuration file. 387 387 my ($collectcfg, $buildtype, $orthogonalbuildtypes); 388 ($configfilename, $gs_mode) = &colcfg::get_collect_cfg_name($out); 388 if ((defined $site) && ($site ne "")) { # GS3 389 $gs_mode = "gs3"; 390 } 391 $configfilename = &colcfg::get_collect_cfg_name($out, $gs_mode); 389 392 $collectcfg = &colcfg::read_collection_cfg ($configfilename, $gs_mode); 390 393 -
main/trunk/greenstone2/bin/script/explode_metadata_database.pl
r24952 r26567 229 229 # read in the collect.cfg file 230 230 # Read in the collection configuration file. 231 my ($configfilename, $gs_mode) = &colcfg::get_collect_cfg_name(STDERR); 231 my $gs_mode = "gs2"; 232 if ((defined $site) && ($site ne "")) { # GS3 233 $gs_mode = "gs3"; 234 } 235 my $configfilename = &colcfg::get_collect_cfg_name(STDERR, $gs_mode); 232 236 my $collectcfg = &colcfg::read_collect_cfg ($configfilename, $gs_mode); 233 237 $plugin_options_string = &get_plugin_options($collectcfg, $plugin); -
main/trunk/greenstone2/bin/script/incremental-buildcol.pl
r24749 r26567 104 104 105 105 # Read in the collection configuration file. 106 my ($collect_cfg_filename, $gs_mode) = &colcfg::get_collect_cfg_name(STDERR); 106 my $gs_mode = "gs2"; 107 if ((defined $site) && ($site ne "")) { # GS3 108 $gs_mode = "gs3"; 109 } 110 my $collect_cfg_filename = &colcfg::get_collect_cfg_name(STDERR, $gs_mode); 107 111 108 112 my $collectcfg = &colcfg::read_collection_cfg ($collect_cfg_filename,$gs_mode); -
main/trunk/greenstone2/perllib/basebuilder.pm
r26094 r26567 86 86 87 87 # Read in the collection configuration file. 88 my ($colcfgname); 89 ($colcfgname, $gs_mode) = &colcfg::get_collect_cfg_name($outhandle); 88 if ((defined $site) && ($site ne "")) { # GS3 89 $gs_mode = "gs3"; 90 } 91 92 my $colcfgname = &colcfg::get_collect_cfg_name($outhandle, $gs_mode); 90 93 $self->{'collect_cfg'} = &colcfg::read_collection_cfg ($colcfgname, $gs_mode); 91 94 -
main/trunk/greenstone2/perllib/cgiactions/explodeaction.pm
r24071 r26567 91 91 92 92 # Read in the collection configuration file. 93 my ($config_filename, $gs_mode) = &colcfg::get_collect_cfg_name($out); 93 my $gs_mode = "gs2"; 94 if ((defined $site) && ($site ne "")) { # GS3 95 $gs_mode = "gs3"; 96 } 97 my $config_filename = &colcfg::get_collect_cfg_name($out, $gs_mode); 94 98 my $collectcfg = &colcfg::read_collection_cfg ($config_filename, $gs_mode); 95 99 -
main/trunk/greenstone2/perllib/colcfg.pm
r25677 r26567 261 261 262 262 # method to check for filename of collect.cfg, and gs mode. 263 sub get_collect_cfg_name {263 sub get_collect_cfg_name_old { 264 264 my ($out) = @_; 265 265 … … 288 288 (&gsprintf($out, "{common.cannot_find_cfg_file}\n", $configfilename) && die); 289 289 } 290 291 # method to check for filename of collect.cfg 292 # needs to be given gs_version, since we can have a GS2 collection ported into 293 # GS3 which could potentially have collect.cfg AND collectionConfig.xml 294 # in which case the older version of this subroutine (get_collect_cfg_name_old) 295 # will return the wrong answer for the gs version we're using. 296 sub get_collect_cfg_name { 297 my ($out, $gs_version) = @_; 298 299 # First check if there's a 300 # gsdl/collect/COLLECTION/custom/COLLECTION/etc/custom.cfg file. This 301 # customization was added for DLC by Stefan, 30/6/2007. 302 my $configfilename; 303 304 if($gs_version eq "gs2") { 305 $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "custom", $ENV{'GSDLCOLLECTION'}, "etc", "custom.cfg"); 306 307 if (-e $configfilename) { 308 return $configfilename; 309 } 310 } 311 312 # Check if there is a collectionConfig.xml file if it's gs3 313 if($gs_version eq "gs3") { 314 $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "etc", "collectionConfig.xml"); 315 if (-e $configfilename) { 316 return $configfilename; 317 } 318 } 319 320 # Check if there is a collect.cfg file in the usual place for gs2. 321 if($gs_version eq "gs2") { 322 $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "etc", "collect.cfg"); 323 if (-e $configfilename) { 324 return $configfilename; 325 } 326 } 327 328 # Error. No collection configuration file. 329 (&gsprintf($out, "{common.cannot_find_cfg_file}\n", $configfilename) && die); 330 } 331 290 332 291 333 -
main/trunk/greenstone2/perllib/inexport.pm
r26536 r26567 173 173 } 174 174 175 # set gs_ver ison 2/3175 # set gs_version 2/3 176 176 $self->{'gs_version'} = "2"; 177 177 if ((defined $site) && ($site ne "")) { … … 199 199 200 200 # 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); 202 203 my $collectcfg = &colcfg::read_collection_cfg ($config_filename, $gs_mode); 203 204
Note:
See TracChangeset
for help on using the changeset viewer.