Ignore:
Timestamp:
2011-02-22T21:43:16+13:00 (13 years ago)
Author:
ak19
Message:

Second (final) part of changes for getting OpenOffice conversion to work on a remote WINDOWS Greenstone (Linux was working already).

File:
1 edited

Legend:

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

    r23468 r23732  
    447447}
    448448
     449# sets optional customisable values to do with Open Office
     450sub setup_openoffice {
     451    my $self = shift @_;
     452    my ($optional) = @_;
     453
     454    if (!defined $self->{'soffice_home'}) # Don't need to go through it all again if we'd already done this before
     455    {
     456    # First look in the gsdlsite.cfg file for the openoffice properties to be defined
     457    $self->{'soffice_home'} = $self->get_config_info("soffice_home", $optional);
     458    $self->{'soffice_host'} = $self->get_config_info("soffice_host", $optional);
     459    $self->{'soffice_port'} = $self->get_config_info("soffice_port", $optional);
     460   
     461    if (defined $self->{'soffice_home'}) {
     462        $ENV{'SOFFICE_HOME'} = $self->{'soffice_home'};
     463    }   
     464    if (defined $self->{'soffice_host'}) {
     465        $ENV{'SOFFICE_HOST'} = $self->{'soffice_host'};
     466    }
     467    if (defined $self->{'soffice_port'}) {
     468        $ENV{'SOFFICE_PORT'} = $self->{'soffice_port'};
     469    }
     470    }
     471}
     472
    449473sub setup_gsdl {
    450474    my $self = shift @_;
     
    597621    # FEDORA_HOME and FEDORA_VERSION are needed (by scripts g2f-import and g2f-buildcol).
    598622    $self->setup_fedora_homes($optional);
     623
     624
     625    # Check for any customisations to Open-Office if on Windows
     626    if ($gsdlos eq "windows") {
     627    $self->setup_openoffice($optional);
     628    }
    599629}
    600630
Note: See TracChangeset for help on using the changeset viewer.