Changeset 13811
- Timestamp:
- 2007-01-25T17:24:31+13:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/cgi-bin/gliserver.pl
r13810 r13811 59 59 # Get then remove the ts (timestamp) argument (since this can mess up other scripts) 60 60 my $timestamp = $gsdl_cgi->clean_param("ts"); 61 if ((!defined $timestamp) || ($timestamp =~ m/^\s*$/)) { 62 $timestamp = time(); # Fall back to using the Perl time() function to generate a timestamp 63 } 61 64 $gsdl_cgi->delete("ts"); 62 65 … … 375 378 my $java = $gsdl_cgi->get_java_path(); 376 379 my $java_classpath = &util::filename_cat($gsdlhome, "bin", "java", "GLIServer.jar"); 377 my $zip_file_path = &util::filename_cat($collect_directory, $ username . "-" . $collection. ".zip");380 my $zip_file_path = &util::filename_cat($collect_directory, $collection . "-" . $timestamp . ".zip"); 378 381 my $java_args = "\"$zip_file_path\" \"$collect_directory\" \"$collection\""; 379 382 my $java_command = "$java -classpath \"$java_classpath\" org.greenstone.gatherer.remote.ZipCollectionShell $java_args"; … … 422 425 my $java = $gsdl_cgi->get_java_path(); 423 426 my $java_classpath = &util::filename_cat($gsdlhome, "bin", "java", "GLIServer.jar"); 424 my $zip_file_path = &util::filename_cat($collect_directory, $ username . "-" . $collection . "-archives.zip");427 my $zip_file_path = &util::filename_cat($collect_directory, $collection . "-archives-" . $timestamp . ".zip"); 425 428 my $java_args = "\"$zip_file_path\" \"$collect_directory\" \"$collection\""; 426 429 my $java_command = "$java -classpath \"$java_classpath\" org.greenstone.gatherer.remote.ZipCollectionArchives $java_args"; … … 457 460 my $java = $gsdl_cgi->get_java_path(); 458 461 my $java_classpath = &util::filename_cat($gsdlhome, "bin", "java", "GLIServer.jar"); 459 my $zip_file_path = &util::filename_cat($collect_directory, $username . "-" . "collection-configurations.zip");462 my $zip_file_path = &util::filename_cat($collect_directory, "collection-configurations-" . $timestamp . ".zip"); 460 463 my $java_args = "\"$zip_file_path\" \"$collect_directory\" \"$username\" \"$user_groups\""; 461 464 my $java_command = "$java -classpath \"$java_classpath\" org.greenstone.gatherer.remote.ZipCollectionConfigurations $java_args"; … … 514 517 my $java = $gsdl_cgi->get_java_path(); 515 518 my $java_classpath = &util::filename_cat($gsdlhome, "bin", "java", "GLIServer.jar"); 516 my $zip_file_path = &util::filename_cat($collection_directory, $ username . "-" . $collection . "-file.zip");519 my $zip_file_path = &util::filename_cat($collection_directory, $collection . "-file-" . $timestamp . ".zip"); 517 520 my $java_args = "\"$zip_file_path\" \"$collection_directory\" \"$file\""; 518 521 my $java_command = "$java -classpath \"$java_classpath\" org.greenstone.gatherer.remote.ZipFiles $java_args"; … … 786 789 } 787 790 788 my $file_path = &util::filename_cat($directory_path, $ username . "-" . $file);791 my $file_path = &util::filename_cat($directory_path, $file . "-" . $timestamp); 789 792 if (!open(FOUT, ">$file_path")) { 790 793 $gsdl_cgi->generate_error("Unable to write file $file_path");
Note:
See TracChangeset
for help on using the changeset viewer.