Changeset 37687 for main/trunk/greenstone2/common-src
- Timestamp:
- 2023-04-20T16:20:51+12:00 (14 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/common-src/cgi-bin/gliserver.pl
r37679 r37687 195 195 if ($cmd eq "move-collection-file") { 196 196 &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);201 197 return; 202 198 } … … 1034 1030 1035 1031 1036 sub _move_rename_collection_file1032 sub move_collection_file 1037 1033 { 1038 1034 my ($gsdl_cgi, $username, $timestamp, $site) = @_; … … 1083 1079 &lock_collection($gsdl_cgi, $username, $collection, $site); 1084 1080 1085 return ($source_file, $target_file);1086 }1087 1088 sub move_collection_file1089 {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 1095 1081 &util::mv($source_file, $target_file); 1096 1082 … … 1101 1087 1102 1088 $gsdl_cgi->generate_ok_message("Collection file $source_file moved to $target_file successfully."); 1103 }1104 1105 sub rename_collection_folder1106 {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 moved1115 if (-e $source_file || !-e $target_file) {1116 $gsdl_cgi->generate_error("Could not rename collection folder $source_file to $target_file."); # dies1117 }1118 1119 $gsdl_cgi->generate_ok_message("Collection folder $source_file renamed to $target_file successfully.");1120 1089 } 1121 1090
Note:
See TracChangeset
for help on using the changeset viewer.