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/plugins/PrintInfo.pm

    r32281 r32539  
    5050    { 'name' => "gs_version",
    5151      'desc' => "{PrintInfo.gs_version}",
     52      'type' => "string",
     53      'reqd' => "no",
     54      'hiddengli' => "yes" },
     55    { 'name' => "site_name",
     56      'desc' => "{PrintInfo.site_name}",
    5257      'type' => "string",
    5358      'reqd' => "no",
     
    8186    # the args, just return the object.
    8287    # gsdlinfo must come before gs_version. both are set by plugin.pm
     88    # The optional -site_name <site> (present only for GS3 and when not doing gsdlinfo),
     89    # if it is there, also appears before gs_version and is also set by plugin.pm
    8390    my $v=0;
    8491    foreach my $strArg (@{$args})
    8592    {
    86     if ($v) {
     93    if($v eq "-site_name") {
     94        $self->{'site_name'} = $strArg;
     95    }
     96    elsif($v eq "-gs_version") {
    8797        $self->{'gs_version'} = $strArg;
    8898        last;
     
    93103        #return bless $self, $class;
    94104    }
    95     elsif ($strArg eq "-gs_version") {
    96         $v = 1;     
     105    elsif ($strArg eq "-gs_version" || $strArg eq "-site_name") {       
     106        $v = $strArg;
    97107    }
    98108    }
Note: See TracChangeset for help on using the changeset viewer.