Changeset 15360


Ignore:
Timestamp:
05/07/08 17:43:32 (13 years ago)
Author:
ak19
Message:

Extra test for Greenstone3 added so plugout works for both versions of Greenstone

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugouts/FedoraMETSPlugout.pm

    r15013 r15360  
    513513    else
    514514    {
    515     my $gsdlhome = $ENV{'GSDLHOME'};
     515    my $collectparent;
     516    if (defined $ENV{'GSDL3HOME'}) {
     517        $collectparent = &util::filename_cat($ENV{'GSDL3HOME'},"sites","localsite");
     518    }
     519    else {
     520        # greenstone 2
     521        $collectparent = $ENV{'GSDLHOME'};
     522    }
     523
    516524    my $gsdl_href = "$working_dir/$fname";
    517525   
    518     $gsdl_href =~ s/^$gsdlhome(\/)?//;
     526    $gsdl_href =~ s/^$collectparent(\/)?//;
    519527    $gsdl_href = "/gsdl/$gsdl_href";
    520528   
     
    627635       else
    628636       {
    629            my $gsdlhome = $ENV{'GSDLHOME'};
     637           my $collectparent;
     638           if (defined $ENV{'GSDL3HOME'}) {
     639           $collectparent = &util::filename_cat($ENV{'GSDL3HOME'},"sites","localsite");
     640           }
     641           else {
     642           # greenstone 2
     643           $collectparent = $ENV{'GSDLHOME'};
     644           }
     645
    630646           my $gsdl_href = "$working_dir/$assfilePath";
    631647           
    632            $gsdl_href =~ s/^$gsdlhome(\/)?//;
     648           $gsdl_href =~ s/^$collectparent(\/)?//;
    633649           $gsdl_href = "/gsdl/$gsdl_href";
    634650           
Note: See TracChangeset for help on using the changeset viewer.