Changeset 22453

Show
Ignore:
Timestamp:
20.07.2010 16:44:14 (10 years ago)
Author:
ak19
Message:

2nd commit to do with getting Remote GLI to work with colgroups: changes to gliserver.pl, mostly to do with replacing the vertical bar separating the colgroup and coltailname with the OS-dependent slash.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/cgi-bin/gliserver.pl

    r20959 r22453  
    406406    $gsdl_cgi->generate_error("No collection specified."); 
    407407    } 
     408    $collection =~ s/\|/&util::get_dirsep()/eg;  # Convert the '|' characters into whatever is right for this OS 
    408409 
    409410    # Ensure the user is allowed to edit this collection 
     
    442443    $gsdl_cgi->generate_error("No collection specified."); 
    443444    } 
     445    $collection =~ s/\|/&util::get_dirsep()/eg;  # Convert the '|' characters into whatever is right for this OS 
     446 
    444447    my $file = $gsdl_cgi->clean_param("file"); 
    445448    if ((!defined $file) || ($file =~ m/^\s*$/)) { 
     
    492495    $gsdl_cgi->generate_error("No collection specified."); 
    493496    } 
     497    $collection =~ s/\|/&util::get_dirsep()/eg;  # Convert the '|' characters into whatever is right for this OS 
    494498     
    495499    # language and region Environment Variable setting on the client side that was used to zip files. 
     
    548552    $gsdl_cgi->generate_error("No collection specified."); 
    549553    } 
     554    $collection =~ s/\|/&util::get_dirsep()/eg;  # Convert the '|' characters into whatever is right for this OS 
    550555 
    551556    # language and region Environment Variable setting on the client side that was used to zip files. 
     
    639644    $gsdl_cgi->generate_error("No collection specified."); 
    640645    } 
     646    $collection =~ s/\|/&util::get_dirsep()/eg;  # Convert the '|' characters into whatever is right for this OS 
     647 
    641648    my $file = $gsdl_cgi->clean_param("file"); 
    642649    if ((!defined $file) || ($file =~ m/^\s*$/)) { 
     
    669676    $gsdl_cgi->generate_error("No collection specified."); 
    670677    } 
     678    my $collection_tail_name = s/^(.*\|)//; 
     679    $collection =~ s/\|/&util::get_dirsep()/eg;  # Convert the '|' characters into whatever is right for this OS 
     680 
    671681    # language and region Environment Variable setting on the client side that was used to zip files. 
    672682    my $lang_env = $gsdl_cgi->clean_param("lr") || ""; 
     
    701711    my $java = $gsdl_cgi->get_java_path(); 
    702712    my $java_classpath = &util::filename_cat($ENV{'GSDLHOME'}, "bin", "java", "GLIServer.jar"); 
    703     my $zip_file_path = &util::filename_cat($collection_directory, $collection . "-file-" . $timestamp . ".zip"); 
     713    my $zip_file_path = &util::filename_cat($collection_directory, $collection_tail_name . "-file-" . $timestamp . ".zip"); 
    704714    my $java_args = "\"$zip_file_path\" \"$collection_directory\" \"$file\""; 
    705715    $ENV{'LANG'} = $lang_env; 
     
    886896    $gsdl_cgi->generate_error("No collection specified."); 
    887897    } 
     898    $collection =~ s/\|/&util::get_dirsep()/eg;  # Convert the '|' characters into whatever is right for this OS 
     899 
    888900    my $source_file = $gsdl_cgi->clean_param("source"); 
    889901    if ((!defined $source_file) || ($source_file =~ m/^\s*$/)) { 
     
    937949    $gsdl_cgi->generate_error("No collection specified."); 
    938950    } 
     951    $collection =~ s/\|/&util::get_dirsep()/eg;  # Convert the '|' characters into whatever is right for this OS 
     952 
    939953    my $directory = $gsdl_cgi->clean_param("directory"); 
    940954    if ((!defined $directory) || ($directory =~ m/^\s*$/)) { 
     
    9921006    $gsdl_cgi->generate_error("No collection specified."); 
    9931007    } 
     1008    $collection =~ s/\|/&util::get_dirsep()/eg;  # Convert the '|' characters into whatever is right for this OS 
    9941009    $gsdl_cgi->delete("c"); 
    9951010 
     
    10751090    $gsdl_cgi->generate_error("No collection specified."); 
    10761091    } 
     1092    $collection =~ s/\|/&util::get_dirsep()/eg;  # Convert the '|' characters into whatever is right for this OS 
     1093 
    10771094    my $file = $gsdl_cgi->clean_param("file"); 
    10781095    if ((!defined $file) || ($file =~ m/^\s*$/)) {