mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-05 16:35:10 +00:00
Monotone-Parent: 2c8cf5595f147309d3c7bb0d723b5cb49c375fb4
Monotone-Revision: 39a02584d6f552b43a783fc48bc54d99f63c12d0 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-08-25T19:22:59 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -134,25 +134,26 @@
|
||||
|
||||
/* helper */
|
||||
|
||||
- (NSString *)_completeURIForMethod:(NSString *)_method {
|
||||
- (NSString *) _completeURIForMethod: (NSString *) _method
|
||||
{
|
||||
// TODO: this is a DUP of UIxAppointmentEditor
|
||||
NSString *uri;
|
||||
NSRange r;
|
||||
|
||||
|
||||
uri = [[[self context] request] uri];
|
||||
|
||||
|
||||
/* first: identify query parameters */
|
||||
r = [uri rangeOfString: @"?" options:NSBackwardsSearch];
|
||||
if (r.length > 0)
|
||||
uri = [uri substringToIndex:r.location];
|
||||
|
||||
|
||||
/* next: append trailing slash */
|
||||
if (![uri hasSuffix: @"/"])
|
||||
uri = [uri stringByAppendingString: @"/"];
|
||||
|
||||
|
||||
/* next: append method */
|
||||
uri = [uri stringByAppendingString:_method];
|
||||
|
||||
|
||||
/* next: append query parameters */
|
||||
return [self completeHrefForMethod:uri];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user