Ignore:
Timestamp:
2010-02-16T19:57:37+13:00 (12 years ago)
Author:
ak19
Message:

For Fedora: the Greenstone server's prefix URL is obtained from gsdlsite.cfg for GS2 and from greenstone3.xml in packages/tomcat for GS3 and this is used by FedoraMETSPlugout so it can refer to the relative paths for associated files like images.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugouts/FedoraMETSPlugout.pm

    r21687 r21719  
    6868   
    6969    my $self = new METSPlugout($plugoutlist,$inputargs,$hashArgOptLists);
    70    
     70
    7171    return bless $self, $class;
    7272}
     
    544544    $gsdl_href =~ s/\\/\//g;                   # make sure we have url paths (which only use / not \)
    545545    my $localfedora = &util::filename_cat($ENV{'GSDL3SRCHOME'}, "packages", "tomcat", "conf", "Catalina", "localhost", "fedora.xml");
    546     if($ENV{'GSDL3SRCHOME'} && -e $localfedora) {                   # prepend gsdl
    547         $gsdl_href = "/greenstone3/sites/localsite/$gsdl_href";     # Fedora uses Greenstone's tomcat
     546   
     547    my $greenstone_url_prefix = &util::get_greenstone_url_prefix();
     548    # prepend url_prefix (which will contain the forward slash upfront)
     549    if($ENV{'GSDL3SRCHOME'} && -e $localfedora) {               # Fedora uses Greenstone's tomcat.
     550        $gsdl_href = "$greenstone_url_prefix/sites/localsite/$gsdl_href";     # Default: /greenstone3/sites/localsite/$gsdl_href
    548551    } else {
    549         $gsdl_href = "/gsdl/$gsdl_href";
     552        $gsdl_href = "$greenstone_url_prefix/$gsdl_href";       # By default: "/greenstone/$gsdl_href";
    550553    }
    551554
     
    680683           $gsdl_href =~ s/\\/\//g;                   # make sure we have url paths (which only use / not \)
    681684           my $localfedora = &util::filename_cat($ENV{'GSDL3SRCHOME'}, "packages", "tomcat", "conf", "Catalina", "localhost", "fedora.xml");
    682            if($ENV{'GSDL3SRCHOME'} && -e $localfedora) {                   # prepend gsdl
    683            $gsdl_href = "/greenstone3/sites/localsite/$gsdl_href";     # Fedora uses Greenstone's tomcat
     685
     686           my $greenstone_url_prefix = &util::get_greenstone_url_prefix();
     687           # prepend url_prefix (which will contain the forward slash upfront)
     688           if($ENV{'GSDL3SRCHOME'} && -e $localfedora) {                 # Fedora uses Greenstone's tomcat.
     689           $gsdl_href = "$greenstone_url_prefix/sites/localsite/$gsdl_href";    # Default: /greenstone3/sites/localsite/$gsdl_href
    684690           } else {
    685            $gsdl_href = "/gsdl/$gsdl_href";
     691           $gsdl_href = "$greenstone_url_prefix/$gsdl_href";         # By default: "/greenstone/$gsdl_href";
    686692           }
    687693
Note: See TracChangeset for help on using the changeset viewer.