Changeset 37687


Ignore:
Timestamp:
2023-04-20T16:20:51+12:00 (12 months ago)
Author:
anupama
Message:

Removing the rename folder utility function from gliserver.pl, as fldv for incremental building is not a client-gli/remoteGS3 feature.

File:
1 edited

Legend:

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

    r37679 r37687  
    195195    if ($cmd eq "move-collection-file") {
    196196    &move_collection_file($gsdl_cgi, $username, $timestamp, $site);
    197     return;
    198     }
    199     if ($cmd eq "rename-collection-folder") {
    200     &rename_collection_folder($gsdl_cgi, $username, $timestamp, $site);
    201197    return;
    202198    }
     
    10341030
    10351031
    1036 sub _move_rename_collection_file
     1032sub move_collection_file
    10371033{
    10381034    my ($gsdl_cgi, $username, $timestamp, $site) = @_;
     
    10831079    &lock_collection($gsdl_cgi, $username, $collection, $site);
    10841080
    1085     return ($source_file, $target_file);
    1086 }
    1087    
    1088 sub move_collection_file
    1089 {
    1090     my ($gsdl_cgi, $username, $timestamp, $site) = @_;
    1091 
    1092     my ($source_file, $target_file) =  &_move_rename_collection_file($gsdl_cgi,
    1093                                      $username, $timestamp, $site);
    1094    
    10951081    &util::mv($source_file, $target_file);
    10961082
     
    11011087
    11021088    $gsdl_cgi->generate_ok_message("Collection file $source_file moved to $target_file successfully.");
    1103 }
    1104 
    1105 sub rename_collection_folder
    1106 {
    1107     my ($gsdl_cgi, $username, $timestamp, $site) = @_;
    1108 
    1109     my ($source_file, $target_file) =  &_move_rename_collection_file($gsdl_cgi,
    1110                                      $username, $timestamp, $site);
    1111 
    1112     &FileUtils::renameDirectory($source_file, $target_file);
    1113 
    1114     # Check that the collection source file was moved
    1115     if (-e $source_file || !-e $target_file) {
    1116     $gsdl_cgi->generate_error("Could not rename collection folder $source_file to $target_file."); # dies
    1117     }
    1118 
    1119     $gsdl_cgi->generate_ok_message("Collection folder $source_file renamed to $target_file successfully.");
    11201089}
    11211090
Note: See TracChangeset for help on using the changeset viewer.