Changeset 13462


Ignore:
Timestamp:
2006-12-08T12:07:40+13:00 (17 years ago)
Author:
mdewsnip
Message:

Added a special case to the run_script action for explode_metadata_database.pl, since it takes a file rather than a collection as the main argument.

File:
1 edited

Legend:

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

    r13395 r13462  
    696696    &lock_collection($gsdl_cgi, $username, $collection) unless ($script eq "mkcol.pl");
    697697
     698    # Last argument is the collection name, except for explode_metadata_database.pl
    698699    my $perl_args = $collection;
     700    if ($script eq "explode_metadata_database.pl") {
     701    # Last argument is the file to be exploded
     702    my $file = $gsdl_cgi->clean_param("file");
     703    if ((!defined $file) || ($file =~ m/^\s*$/)) {
     704        $gsdl_cgi->generate_error("No file specified.");
     705    }
     706    $gsdl_cgi->delete("file");
     707    $perl_args = $file;
     708    }
     709
    699710    foreach my $cgi_arg_name ($gsdl_cgi->param) {
    700711    my $cgi_arg_value = $gsdl_cgi->safe_val($gsdl_cgi->clean_param($cgi_arg_name));
Note: See TracChangeset for help on using the changeset viewer.