Changeset 15943

Show
Ignore:
Timestamp:
09.06.2008 17:56:06 (11 years ago)
Author:
ak19
Message:

GS3 needs to use site variable instead of localsite.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/web/WEB-INF/cgi/gliserver4gs3.pl

    r15942 r15943  
    119119    } 
    120120    elsif ($cmd eq "file-exists") {  
    121     &file_exists($gsdl_cgi); 
    122     }    
     121    &file_exists($gsdl_cgi, $site); 
     122    }  
    123123    else { 
    124124    $gsdl_cgi->generate_error("Unrecognised command: '$cmd'"); 
     
    550550sub file_exists 
    551551{ 
    552     my ($gsdl_cgi, $username, $timestamp) = @_; 
    553  
    554552    my ($gsdl_cgi) = @_; 
    555553 
     
    564562    $file =~ s/\|/&util::get_dirsep()/eg;  # Convert the '|' characters into whatever is right for this OS 
    565563    
    566     # Not necessary: checking whether the user is authenticated to query existance of the file 
    567     #&authenticate_user($gsdl_cgi, $username, $collection); 
    568  
    569     my $collection_directory = &util::filename_cat($ENV{'GSDL3SRCHOME'}, "web", "sites", "localsite", "collect", $collection); 
     564    # Not necessary to check whether the user is authenticated to query existence of the file 
     565     
     566    my $collection_directory = &util::filename_cat($ENV{'GSDLHOME'}, "collect", $collection); 
     567    if(defined $ENV{'GSDL3SRCHOME'}) { # GS3 case 
     568    $collection_directory = &util::filename_cat($ENV{'GSDL3SRCHOME'}, "web", "sites", $site, "collect", $collection); 
     569    } 
    570570    $gsdl_cgi->checked_chdir($collection_directory); 
    571571 
     
    577577    } 
    578578} 
     579 
    579580 
    580581sub download_collection_file