mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-19 13:43:22 +00:00
Monotone-Parent: df6e6d4970991afb31fd11ee19fa747e5c5c76d5
Monotone-Revision: 45f5145837bf26807ee9a0b765cfdd2dbbd25518 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-10-22T22:24:08 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
2007-10-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/SOGoUser.m ([SOGoUser +language]): new method
|
||||
that returns any generically-found language.
|
||||
([SoUser -language]): modified to call the above.
|
||||
([SOGoUser -language]): modified to call the above if the user
|
||||
language has a null length.
|
||||
|
||||
* SoObjects/Contacts/SOGoContactLDIFEntry.m ([SOGoContactLDIFEntry
|
||||
-davEntityTag]): modified to return the "hash" of the vCard string.
|
||||
|
||||
|
||||
@@ -67,6 +67,8 @@ extern NSString *SOGoWeekStartFirstFullWeek;
|
||||
NSMutableArray *mailAccounts;
|
||||
}
|
||||
|
||||
+ (NSString *) language;
|
||||
|
||||
+ (SOGoUser *) userWithLogin: (NSString *) login
|
||||
roles: (NSArray *) roles;
|
||||
- (void) setCurrentPassword: (NSString *) newPassword;
|
||||
|
||||
+19
-21
@@ -61,19 +61,7 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
|
||||
|
||||
- (NSString *) language
|
||||
{
|
||||
NSArray *bLanguages;
|
||||
WOContext *context;
|
||||
NSString *language;
|
||||
|
||||
context = [[WOApplication application] context];
|
||||
bLanguages = [[context request] browserLanguages];
|
||||
if ([bLanguages count] > 0)
|
||||
language = [bLanguages objectAtIndex: 0];
|
||||
|
||||
if (![language length])
|
||||
language = defaultLanguage;
|
||||
|
||||
return language;
|
||||
return [SOGoUser language];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -118,6 +106,23 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
|
||||
isEqualToString: @"bypass"]);
|
||||
}
|
||||
|
||||
+ (NSString *) language
|
||||
{
|
||||
NSArray *bLanguages;
|
||||
WOContext *context;
|
||||
NSString *language;
|
||||
|
||||
context = [[WOApplication application] context];
|
||||
bLanguages = [[context request] browserLanguages];
|
||||
if ([bLanguages count] > 0)
|
||||
language = [bLanguages objectAtIndex: 0];
|
||||
|
||||
if (![language length])
|
||||
language = defaultLanguage;
|
||||
|
||||
return language;
|
||||
}
|
||||
|
||||
+ (SOGoUser *) userWithLogin: (NSString *) newLogin
|
||||
roles: (NSArray *) newRoles
|
||||
{
|
||||
@@ -338,14 +343,7 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
|
||||
{
|
||||
language = [[self userDefaults] stringForKey: @"Language"];
|
||||
if (![language length])
|
||||
{
|
||||
context = [[WOApplication application] context];
|
||||
bLanguages = [[context request] browserLanguages];
|
||||
if ([bLanguages count] > 0)
|
||||
language = [bLanguages objectAtIndex: 0];
|
||||
}
|
||||
if (![language length])
|
||||
language = defaultLanguage;
|
||||
language = [SOGoUser language];
|
||||
[language retain];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user