Changeset 28997 for main


Ignore:
Timestamp:
2014-04-28T14:36:29+12:00 (10 years ago)
Author:
ak19
Message:

Added an is_gs3 subroutine to util.pm and this is now used by BasePlugout when generating the rss file appropriate to the GS version

Location:
main/trunk/greenstone2/perllib
Files:
2 edited

Legend:

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

    r28996 r28997  
    918918        my $rss_entry = "<item>\n";
    919919        $rss_entry   .= "   <title>$dc_title</title>\n";
    920     if($ENV{'GSDL3SRCHOME'}) {
     920    if(&util::is_gs3()) {
    921921        $rss_entry   .= "   <link>_httpdomain__httpcollection_/document/$oid</link>\n";
    922922    } else {
  • main/trunk/greenstone2/perllib/util.pm

    r28604 r28997  
    11131113    }
    11141114    return $ENV{'GSDLOS'}.$gsdlarch;
     1115}
     1116
     1117# returns 1 if this (GS server) is a GS3 installation, returns 0 if it's GS2.
     1118sub is_gs3() {
     1119    if($ENV{'GSDL3SRCHOME'}) {
     1120    return 1;
     1121    } else {
     1122    return 0;
     1123    }
    11151124}
    11161125
Note: See TracChangeset for help on using the changeset viewer.