Show
Ignore:
Timestamp:
19.07.2017 18:53:04 (2 years ago)
Author:
ak19
Message:

Cmdline testing of gliserver.pl revealed that gliserver's args (like cmd=check-installation) were being passed to the GS3 extensions and resulting in confusing and unnecessary error messages being printed from there. So now gsdlCGI.pm does gliserver's args are stored and emptied before calling the extension setup files and then restored thereafter.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/cgi-bin/gsdlCGI.pm

    r31750 r31811  
    631631    } 
    632632 
     633    # Don't pass the arguments to gliserver.pl (e.g. cmd=check-installation) to Greenstone extensions' setup files 
     634    print STDERR "Args: " . join(",", @ARGV)."\n"; 
     635    my @saved_args = @ARGV; 
     636    if (scalar(@ARGV>0)) { 
     637    @ARGV=(); 
     638    } 
     639 
    633640    foreach my $ext_home (@ext_homes) { 
    634641    # Should really think about making this a subroutine 
     
    664671    } 
    665672 
     673    # restore the args to gliserver.pl 
     674    @ARGV = @saved_args; 
     675    print STDERR "Args: " . join(",", @ARGV)."\n"; 
     676 
    666677    # FEDORA_HOME and FEDORA_VERSION are needed (by scripts g2f-import and g2f-buildcol). 
    667678    $self->setup_fedora_homes($optional);