Changeset 22453 for main/trunk/greenstone2/cgi-bin/gliserver.pl
- Timestamp:
- 2010-07-20T16:44:14+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/cgi-bin/gliserver.pl
r20959 r22453 406 406 $gsdl_cgi->generate_error("No collection specified."); 407 407 } 408 $collection =~ s/\|/&util::get_dirsep()/eg; # Convert the '|' characters into whatever is right for this OS 408 409 409 410 # Ensure the user is allowed to edit this collection … … 442 443 $gsdl_cgi->generate_error("No collection specified."); 443 444 } 445 $collection =~ s/\|/&util::get_dirsep()/eg; # Convert the '|' characters into whatever is right for this OS 446 444 447 my $file = $gsdl_cgi->clean_param("file"); 445 448 if ((!defined $file) || ($file =~ m/^\s*$/)) { … … 492 495 $gsdl_cgi->generate_error("No collection specified."); 493 496 } 497 $collection =~ s/\|/&util::get_dirsep()/eg; # Convert the '|' characters into whatever is right for this OS 494 498 495 499 # language and region Environment Variable setting on the client side that was used to zip files. … … 548 552 $gsdl_cgi->generate_error("No collection specified."); 549 553 } 554 $collection =~ s/\|/&util::get_dirsep()/eg; # Convert the '|' characters into whatever is right for this OS 550 555 551 556 # language and region Environment Variable setting on the client side that was used to zip files. … … 639 644 $gsdl_cgi->generate_error("No collection specified."); 640 645 } 646 $collection =~ s/\|/&util::get_dirsep()/eg; # Convert the '|' characters into whatever is right for this OS 647 641 648 my $file = $gsdl_cgi->clean_param("file"); 642 649 if ((!defined $file) || ($file =~ m/^\s*$/)) { … … 669 676 $gsdl_cgi->generate_error("No collection specified."); 670 677 } 678 my $collection_tail_name = s/^(.*\|)//; 679 $collection =~ s/\|/&util::get_dirsep()/eg; # Convert the '|' characters into whatever is right for this OS 680 671 681 # language and region Environment Variable setting on the client side that was used to zip files. 672 682 my $lang_env = $gsdl_cgi->clean_param("lr") || ""; … … 701 711 my $java = $gsdl_cgi->get_java_path(); 702 712 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"); 704 714 my $java_args = "\"$zip_file_path\" \"$collection_directory\" \"$file\""; 705 715 $ENV{'LANG'} = $lang_env; … … 886 896 $gsdl_cgi->generate_error("No collection specified."); 887 897 } 898 $collection =~ s/\|/&util::get_dirsep()/eg; # Convert the '|' characters into whatever is right for this OS 899 888 900 my $source_file = $gsdl_cgi->clean_param("source"); 889 901 if ((!defined $source_file) || ($source_file =~ m/^\s*$/)) { … … 937 949 $gsdl_cgi->generate_error("No collection specified."); 938 950 } 951 $collection =~ s/\|/&util::get_dirsep()/eg; # Convert the '|' characters into whatever is right for this OS 952 939 953 my $directory = $gsdl_cgi->clean_param("directory"); 940 954 if ((!defined $directory) || ($directory =~ m/^\s*$/)) { … … 992 1006 $gsdl_cgi->generate_error("No collection specified."); 993 1007 } 1008 $collection =~ s/\|/&util::get_dirsep()/eg; # Convert the '|' characters into whatever is right for this OS 994 1009 $gsdl_cgi->delete("c"); 995 1010 … … 1075 1090 $gsdl_cgi->generate_error("No collection specified."); 1076 1091 } 1092 $collection =~ s/\|/&util::get_dirsep()/eg; # Convert the '|' characters into whatever is right for this OS 1093 1077 1094 my $file = $gsdl_cgi->clean_param("file"); 1078 1095 if ((!defined $file) || ($file =~ m/^\s*$/)) {
Note:
See TracChangeset
for help on using the changeset viewer.