Ignore:
Timestamp:
2018-10-25T18:12:59+13:00 (5 years ago)
Author:
ak19
Message:

New plugin parameter site_name (only set for GS3) that is passed to plugin::load_plugins() (but not to plugin::load_plugin_for_info()/gsdlinfo mode) by inexport.pm during import.pl and by basebuilder.pm during buildcol.pl. Like the gs_version parameter, it is parsed by plugins/PrintInfo.pm and will appear before gs_version (to preserve the way things were being parsed until now)

File:
1 edited

Legend:

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

    r30597 r32539  
    179179sub load_plugins {
    180180    my ($plugin_list) = shift @_;
    181     my ($incremental_mode, $gs_version);
    182     ($verbosity, $outhandle, $failhandle, $globaloptions, $incremental_mode, $gs_version) = @_; # globals
     181    my ($incremental_mode, $gs_version, $site);
     182    ($verbosity, $outhandle, $failhandle, $globaloptions, $incremental_mode, $gs_version, $site) = @_; # globals
    183183    my @plugin_objects = ();
    184184    $verbosity = 2 unless defined $verbosity;
     
    204204    # put quotes around each option to the plugin, unless the option is already quoted
    205205    map { $_ = "\"$_\"" unless ($_ =~ m/^\s*\".*\"\s*$/) ; } @$pluginoptions;
    206     my $options = "-gs_version,$gs_version,".join (",", @$pluginoptions);
     206    my $site_option = $site ? "\"-site_name\",\"$site\"," : "";
     207    my $options = "$site_option"."-gs_version,$gs_version,".join (",", @$pluginoptions);   
    207208    if ($globals) {
    208209        if (@$pluginoptions) {
Note: See TracChangeset for help on using the changeset viewer.