Changeset 23401

Show
Ignore:
Timestamp:
07.12.2010 16:58:51 (8 years ago)
Author:
max
Message:

Tested using this action under windows using Sqlite as the database. Code needed a variety of updates to support this.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/cgiactions/baseaction.pm

    r21715 r23401  
    2727package baseaction; 
    2828 
    29  
    3029use strict; 
     30 
     31use inexport; 
    3132 
    3233our $authenication_enabled = 0; 
     
    5758         'iis6_mode' => $iis6_mode, 
    5859         'gsdlhome' => $ENV{'GSDLHOME'} }; 
    59  
    6060 
    6161    # Retrieve the (required) command CGI argument 
     
    146146    my $comp_args = $action_table->{$action}->{'compulsory-args'}; 
    147147    foreach my $ca (@$comp_args) { 
    148     if (!defined $gsdl_cgi->{$ca}) { 
     148    if (!defined $gsdl_cgi->param($ca)) { 
    149149        $gsdl_cgi->generate_error("Compulsory argument '$ca' missing"); 
    150150    } 
     
    158158    my $opt_args = $action_table->{$action}->{'optional-args'}; 
    159159    foreach my $oa (@$opt_args) { 
    160     if (defined $gsdl_cgi->{$oa}) { 
     160    if (defined $gsdl_cgi->param($oa)) { 
    161161         
    162162        $self->{$oa} = $gsdl_cgi->clean_param($oa); 
     
    166166 
    167167 
     168    # Retrieve infodb-type 
     169    if (defined $collect) { 
     170        my $inexport = newCGI inexport("metadata-server",$collect); 
     171        my ($config_filename,$collect_cfg) = $inexport->read_collection_cfg($collect);    
     172        $self->{'infodbtype'} = $collect_cfg->{'infodbtype'}; 
     173    } 
     174     
    168175    return bless $self, $class; 
    169176}