Changeset 23402

Show
Ignore:
Timestamp:
07.12.2010 17:00:02 (8 years ago)
Author:
max
Message:

New "psuedo" constructor added that is useful to call from CGI Perl scripts

Files:
1 modified

Legend:

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

    r23170 r23402  
    126126} 
    127127 
     128# Simplified version of the contstructor for use with CGI scripts 
     129sub newCGI  
     130{ 
     131    my $class = shift (@_); 
     132    my ($mode,$collect) = @_; 
     133 
     134    my $self = { 'xml' => 0, 'mode' => $mode }; 
     135 
     136    $self->{'out'} = STDERR; 
     137    $self->{'site'} = ""; 
     138    $self->{'collectdir'} = &util::filename_cat($ENV{'GSDLHOME'},"collect"); 
     139    $self->{'faillog'} = ""; 
     140    
     141    $self->{'collection'} = $collect; 
     142 
     143    return bless $self, $class; 
     144} 
    128145sub get_collection 
    129146{