Ignore:
Timestamp:
2010-10-11T23:21:27+13:00 (12 years ago)
Author:
davidb
Message:

Inclusion of a new 'pre-new' routine that helps this package set GSDLHOME and related values

File:
1 edited

Legend:

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

    r23070 r23088  
    1212
    1313@gsdlCGI::ISA = ( 'CGI' );
     14
     15sub prenew {
     16    my $class = shift @_;
     17       
     18    my $version;
     19    if (-e "gsdl3site.cfg") {
     20    $version = 3;
     21    } else {
     22    $version = 2;
     23    }
     24
     25    my $self = {};
     26
     27    if ($version == 2) {
     28    $self->{'site_filename'} = "gsdlsite.cfg";
     29    $self->{'greenstone_version'} = 2;
     30    }
     31    elsif ($version == 3) {
     32    $self->{'site_filename'} = "gsdl3site.cfg";
     33    $self->{'greenstone_version'} = 3;
     34    }
     35   
     36    my $bself = bless $self, $class;
     37
     38    $bself->setup_gsdl();
     39
     40    return $bself;
     41}
     42
    1443
    1544sub new {
Note: See TracChangeset for help on using the changeset viewer.