Monotone-Parent: 5a9d1a37ff5b7e57b7c92db2cc2c56d3af92d80c

Monotone-Revision: 1c7442ef9f84ce58c394c1539163f94d731b3545

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2008-07-08T11:32:43
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2008-07-08 11:32:43 +00:00
parent fe445c22f1
commit a19563f78b
9 changed files with 197 additions and 168 deletions
+11 -13
View File
@@ -320,7 +320,7 @@
else
result = (([[card childrenWithTag: @"url"
andAttribute: @"type"
havingValue: @"work"] count] > 0)
havingValue: @"work"] count] > 0)
|| [[card childrenWithTag: @"org"] count] > 0);
return result;
@@ -524,26 +524,24 @@
- (id) deleteAction
{
NSException *ex;
id url;
if (![self isDeletableClientObject])
/* return 400 == Bad Request */
return [NSException exceptionWithHTTPStatus:400
reason:@"method cannot be invoked on "
@"the specified object"];
return [NSException exceptionWithHTTPStatus: 400
reason:@"method cannot be invoked on "
@"the specified object"];
ex = [[self clientObject] delete];
if (ex)
{
// TODO: improve error handling
[self debugWithFormat:@"failed to delete: %@", ex];
// TODO: improve error handling
[self debugWithFormat: @"failed to delete: %@", ex];
return ex;
}
url = [[[self clientObject] container] baseURLInContext:[self context]];
return [self redirectToLocation:url];
return [self responseWithStatus: 200
andString: [[self clientObject] nameInContainer]];
}
@end /* UIxContactView */