- Timestamp:
- 2023-04-19T20:59:05+12:00 (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/common-src/cgi-bin/gliserver.pl
r36096 r37679 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); 197 201 return; 198 202 } … … 1030 1034 1031 1035 1032 sub move_collection_file1036 sub _move_rename_collection_file 1033 1037 { 1034 1038 my ($gsdl_cgi, $username, $timestamp, $site) = @_; … … 1079 1083 &lock_collection($gsdl_cgi, $username, $collection, $site); 1080 1084 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 1081 1095 &util::mv($source_file, $target_file); 1082 1096 … … 1087 1101 1088 1102 $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."); 1089 1120 } 1090 1121
Note:
See TracChangeset
for help on using the changeset viewer.