Changeset 27158

Show
Ignore:
Timestamp:
05.04.2013 14:20:49 (7 years ago)
Author:
ak19
Message:

get_collection_dir was never returning anything, but was expected to return the collection dir. And for GS3, the web folder can be located outside GSDL3SRCHOME, in which case it will be stored in GSDL3HOME.

Files:
1 modified

Legend:

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

    r26206 r27158  
    682682    } 
    683683    } 
    684     elsif($self->{'greenstone_version'} == 3 && defined $ENV{'GSDL3SRCHOME'}) { 
    685     if(defined $collection) { 
    686         $collection_directory = &util::filename_cat($ENV{'GSDL3SRCHOME'}, "web", "sites", $site, "collect", $collection); 
    687     } else { 
    688         $collection_directory = &util::filename_cat($ENV{'GSDL3SRCHOME'}, "web", "sites", $site, "collect"); 
    689     } 
    690     } 
     684    elsif($self->{'greenstone_version'} == 3) { 
     685    if(defined $ENV{'GSDL3HOME'}) { 
     686        if(defined $collection) { 
     687        $collection_directory = &util::filename_cat($ENV{'GSDL3HOME'}, "sites", $site, "collect", $collection); 
     688        } else { 
     689        $collection_directory = &util::filename_cat($ENV{'GSDL3HOME'}, "sites", $site, "collect"); 
     690        } 
     691    } 
     692    elsif(defined $ENV{'GSDL3SRCHOME'}) { 
     693        if(defined $collection) { 
     694        $collection_directory = &util::filename_cat($ENV{'GSDL3SRCHOME'}, "web", "sites", $site, "collect", $collection); 
     695        } else { 
     696        $collection_directory = &util::filename_cat($ENV{'GSDL3SRCHOME'}, "web", "sites", $site, "collect"); 
     697        } 
     698    } 
     699    } 
     700    return $collection_directory; 
    691701} 
    692702