Changeset 23402


Ignore:
Timestamp:
2010-12-07T17:00:02+13:00 (13 years ago)
Author:
max
Message:

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

File:
1 edited

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{
Note: See TracChangeset for help on using the changeset viewer.