mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-10 09:21:23 +00:00
Monotone-Parent: a6f65fa9361ca6a3fc6870978fa9814e3c65652e
Monotone-Revision: 4198b7cec911933d302e467416f80df87577acdb Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-07-22T20:32:16 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
2007-07-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/NSString+Utilities.m ([NSString
|
||||
-asDavInvocation]): new method returning a dictionary with a "ns"
|
||||
key representing the dav namespace and a "method" key representing
|
||||
the dav method name of the request.
|
||||
|
||||
* UI/PreferencesUI/UIxPreferences.m ([UIxPreferences
|
||||
+initialize]): scan the value of SOGoUIxUserCanChangePassword.
|
||||
Default is "no".
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
- (NSString *) urlWithoutParameters;
|
||||
|
||||
- (NSString *) davMethodToObjC;
|
||||
- (NSDictionary *) asDavInvocation;
|
||||
|
||||
- (NSString *) stringByDetectingURLs;
|
||||
|
||||
|
||||
@@ -108,6 +108,35 @@ static NSMutableCharacterSet *urlAfterEndingChars = nil;
|
||||
return newName;
|
||||
}
|
||||
|
||||
- (NSDictionary *) asDavInvocation
|
||||
{
|
||||
NSMutableDictionary *davInvocation;
|
||||
NSRange nsEnclosing, methodEnclosing;
|
||||
unsigned int length;
|
||||
|
||||
davInvocation = nil;
|
||||
if ([self hasPrefix: @"{"])
|
||||
{
|
||||
nsEnclosing = [self rangeOfString: @"}"];
|
||||
length = [self length];
|
||||
if (nsEnclosing.length > 0
|
||||
&& nsEnclosing.location < (length - 1))
|
||||
{
|
||||
methodEnclosing = NSMakeRange(nsEnclosing.location + 1,
|
||||
length - nsEnclosing.location - 1);
|
||||
nsEnclosing.length = nsEnclosing.location - 1;
|
||||
nsEnclosing.location = 1;
|
||||
davInvocation = [NSMutableDictionary dictionaryWithCapacity: 2];
|
||||
[davInvocation setObject: [self substringWithRange: nsEnclosing]
|
||||
forKey: @"ns"];
|
||||
[davInvocation setObject: [self substringWithRange: methodEnclosing]
|
||||
forKey: @"method"];
|
||||
}
|
||||
}
|
||||
|
||||
return davInvocation;
|
||||
}
|
||||
|
||||
- (NSRange) _rangeOfURLInRange: (NSRange) refRange
|
||||
{
|
||||
int start, length;
|
||||
|
||||
Reference in New Issue
Block a user