Remove duplicated method

pull/91/head
Francis Lachapelle 2014-08-06 16:03:30 -04:00
parent 77b80e27c6
commit b4d6667f88
3 changed files with 14 additions and 35 deletions

View File

@ -34,6 +34,8 @@
#import <SoObjects/SOGo/SOGoUserManager.h>
#import <SoObjects/SOGo/NSArray+Utilities.h>
#import <SoObjects/SOGo/NSDictionary+Utilities.h>
#import <SoObjects/SOGo/NSString+Utilities.h>
#import <SoObjects/SOGo/SOGoContentObject.h>
#import <SoObjects/SOGo/SOGoGCSFolder.h>
#import <SoObjects/SOGo/SOGoParentFolder.h>
@ -193,9 +195,13 @@
- (WOResponse *) renameFolderAction
{
WOResponse *response;
WORequest *request;
NSDictionary *params, *message;
NSString *folderName;
folderName = [[context request] formValueForKey: @"name"];
request = [context request];
params = [[request contentAsString] objectFromJSONString];
folderName = [params objectForKey: @"name"];
if ([folderName length] > 0)
{
clientObject = [self clientObject];
@ -204,8 +210,9 @@
}
else
{
response = [self responseWithStatus: 500];
[response appendContentString: @"Missing 'name' parameter."];
message = [NSDictionary dictionaryWithObject: @"Missing name parameter" forKey: @"error"];
response = [self responseWithStatus: 500
andString: [message jsonRepresentation]];
}
return response;

View File

@ -292,33 +292,4 @@
return rc;
}
- (id <WOActionResults>) saveAction
{
SOGoContactGCSFolder *folder;
WORequest *request;
WOResponse *response;
NSDictionary *params, *message;
NSString *folderName;
request = [context request];
NSLog(@"%@", [request contentAsString]);
params = [[request contentAsString] objectFromJSONString];
folderName = [params objectForKey: @"name"];
if ([folderName length] > 0)
{
folder = [self clientObject];
[folder renameTo: folderName];
response = [self responseWith204];
}
else
{
message = [NSDictionary dictionaryWithObject: @"Missing name parameter" forKey: @"error"];
response = [self responseWithStatus: 500
andString: [message jsonRepresentation]];
}
return response;
}
@end /* UIxContactFolderActions */

View File

@ -116,8 +116,8 @@
};
save = {
protectedBy = "Change Permissions";
actionClass = "UIxContactFolderActions";
actionName = "save";
actionClass = "UIxFolderActions";
actionName = "renameFolder";
};
userRights = {
protectedBy = "ReadAcls";
@ -153,7 +153,7 @@
pageName = "UIxContactEditor";
actionName = "new";
};
renameFolder = {
save = {
protectedBy = "Change Permissions";
actionClass = "UIxFolderActions";
actionName = "renameFolder";
@ -267,6 +267,7 @@
view = {
protectedBy = "Access Contents Information";
pageName = "UIxContactView";
actionName = "data";
};
edit = {
protectedBy = "Access Contents Information";