diff --git a/ActiveSync/NSDate+ActiveSync.m b/ActiveSync/NSDate+ActiveSync.m index ed3e98b3ae..bd7035a266 100644 --- a/ActiveSync/NSDate+ActiveSync.m +++ b/ActiveSync/NSDate+ActiveSync.m @@ -36,7 +36,7 @@ @implementation NSDate (ActiveSync) - (NSString *) activeSyncRepresentationInContext: (WOContext *) context { - return [self descriptionWithCalendarFormat: @"%Y-%m-%d-T%H:%M:%S.%FZ" timeZone: [NSTimeZone timeZoneWithName: @"GMT"] locale: nil]; + return [self descriptionWithCalendarFormat: @"%Y-%m-%dT%H:%M:%S.%FZ" timeZone: [NSTimeZone timeZoneWithName: @"GMT"] locale: nil]; } diff --git a/ActiveSync/SOGoActiveSyncDispatcher+Sync.m b/ActiveSync/SOGoActiveSyncDispatcher+Sync.m index dfa0b31106..551551e8de 100644 --- a/ActiveSync/SOGoActiveSyncDispatcher+Sync.m +++ b/ActiveSync/SOGoActiveSyncDispatcher+Sync.m @@ -571,24 +571,27 @@ - (void) processSyncGetChanges: (id ) theDocumentElement case ActiveSyncMailFolder: default: { + NSMutableArray *addedOrChangedMessages; SOGoMailObject *mailObject; NSString *uid, *command; NSDictionary *aMessage; NSArray *allMessages; - + int deleted_count; + allMessages = [theCollection syncTokenFieldsWithProperties: nil matchingSyncToken: theSyncKey fromDate: theFilterType]; - + addedOrChangedMessages = [NSMutableArray array]; + deleted_count = 0; + // Check for the WindowSize. // FIXME: we should eventually check for modseq and slice the maximum // amount of messages returned to ensure we don't have the same // modseq accross contiguous boundaries max = [allMessages count]; - if (max > theWindowSize) - { - max = theWindowSize; - more_available = YES; - } + // We first check the number of deleted messages we have + // We do NOT honor the window size here as it seems to be + // impossible to get the modseq of an expunged message so + // we can't iterate in the list of deleted messages. for (i = 0; i < max; i++) { aMessage = [allMessages objectAtIndex: i]; @@ -601,31 +604,53 @@ - (void) processSyncGetChanges: (id ) theDocumentElement [s appendString: @""]; [s appendFormat: @"%@", uid]; [s appendString: @""]; + deleted_count++; } else { - if ([command isEqualToString: @"added"]) - [s appendString: @""]; - else - [s appendString: @""]; + [addedOrChangedMessages addObject: aMessage]; + } + } - mailObject = [theCollection lookupName: uid + // We then "pad" with our added/changed messages. We ALWAYS + // at least return one if available + max = [addedOrChangedMessages count]; + + for (i = 0; i < max; i++) + { + aMessage = [addedOrChangedMessages objectAtIndex: i]; + + uid = [[[aMessage allKeys] lastObject] stringValue]; + command = [[aMessage allValues] lastObject]; + + if ([command isEqualToString: @"added"]) + [s appendString: @""]; + else + [s appendString: @""]; + + mailObject = [theCollection lookupName: uid inContext: context - acquire: 0]; - - [s appendFormat: @"%@", uid]; - [s appendString: @""]; - [s appendString: [mailObject activeSyncRepresentationInContext: context]]; - [s appendString: @""]; - - if ([command isEqualToString: @"added"]) - [s appendString: @""]; - else - [s appendString: @""]; - + acquire: 0]; + + [s appendFormat: @"%@", uid]; + [s appendString: @""]; + [s appendString: [mailObject activeSyncRepresentationInContext: context]]; + [s appendString: @""]; + + if ([command isEqualToString: @"added"]) + [s appendString: @""]; + else + [s appendString: @""]; + + + // We check if we must stop padding + if (i+1+deleted_count > theWindowSize) + { + more_available = YES; + break; } } - + // if (more_available) { diff --git a/ActiveSync/SOGoMailObject+ActiveSync.m b/ActiveSync/SOGoMailObject+ActiveSync.m index 191aef8c50..9f0ce50c3d 100644 --- a/ActiveSync/SOGoMailObject+ActiveSync.m +++ b/ActiveSync/SOGoMailObject+ActiveSync.m @@ -166,8 +166,8 @@ - (NSString *) _uidFromGlobalObjectId: (NSData *) objectId - (NSString *) _emailAddressesFrom: (NSArray *) enveloppeAddresses { NGImap4EnvelopeAddress *address; + NSString *email, *rc, *name; NSMutableArray *addresses; - NSString *email, *rc; int i, max; rc = nil; @@ -179,7 +179,8 @@ - (NSString *) _emailAddressesFrom: (NSArray *) enveloppeAddresses for (i = 0; i < max; i++) { address = [enveloppeAddresses objectAtIndex: i]; - email = [NSString stringWithFormat: @"\"%@\" <%@>", [address personalName], [address baseEMail]]; + name = [address personalName]; + email = [NSString stringWithFormat: @"\"%@\" <%@>", (name ? name : [address baseEMail]), [address baseEMail]]; if (email) [addresses addObject: email]; @@ -377,7 +378,7 @@ - (NSString *) activeSyncRepresentationInContext: (WOContext *) _context // DateReceived value = [self date]; if (value) - [s appendFormat: @"%@", [value activeSyncRepresentationWithoutSeparatorsInContext: context]]; + [s appendFormat: @"%@", [value activeSyncRepresentationInContext: context]]; // DisplayTo [s appendFormat: @"%@", [[context activeUser] login]]; diff --git a/ChangeLog b/ChangeLog index 7a29bd637c..8062bb0ca5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,193 @@ +commit 23789b48bcdcbac738039d214a92cd0bb5aff9e4 +Author: Francis Lachapelle +Date: Fri Mar 7 13:59:51 2014 -0500 + + Update Dutch translation + +M NEWS +M UI/MailPartViewers/Dutch.lproj/Localizable.strings +M UI/PreferencesUI/Dutch.lproj/Localizable.strings +M UI/Scheduler/Dutch.lproj/Localizable.strings + +commit 142296f71e0e22eae76572e7ff23a3b00a2c076f +Author: Francis Lachapelle +Date: Fri Mar 7 10:53:17 2014 -0500 + + Preparation for release 2.2.1 + +M Documentation/SOGo Installation Guide.odt +M Documentation/SOGo Mobile Devices Configuration.odt +M Documentation/SOGo Mozilla Thunderbird Configuration.odt +M Documentation/SOGo Native Microsoft Outlook Configuration.odt +M NEWS +M Version + +commit 3bae2387d4e0efcfe88fd56fa743c70deb638ee8 +Author: Francis Lachapelle +Date: Thu Mar 6 22:13:17 2014 -0500 + + Fix contact autocompletion when UID is a digit + +M NEWS +M UI/WebServerResources/SOGoAutoCompletion.js +M UI/WebServerResources/generic.css + +commit 6cecca6c4f0ffb6edea41f3ade3b7f90f92cdf81 +Author: Francis Lachapelle +Date: Thu Mar 6 21:32:36 2014 -0500 + + Fix CSS id for string prefixed with a digit + + When encoding a string as a CSS identifier, we must add an underscore if + the strings starts with a digit. + +M NEWS +M SoObjects/Mailer/SOGoMailAccounts.m +M SoObjects/SOGo/NSString+Utilities.m +M UI/WebServerResources/JavascriptAPIExtensions.js + +commit 28b1938bd972462be383ef612e38a93870ccff1b +Author: Francis Lachapelle +Date: Thu Mar 6 21:25:48 2014 -0500 + + Show folder name in dialog when renaming folder + +M NEWS +M UI/WebServerResources/MailerUI.js +M UI/WebServerResources/generic.js + +commit 31ace947cbf1fbbfa93a92ed0f028e5a56b8b0d1 +Author: Ludovic Marcotte +Date: Thu Mar 6 14:16:08 2014 -0500 + + Fixed race condition when syncing huge amount of deleted messages using AS + +M ActiveSync/SOGoActiveSyncDispatcher+Sync.m +M NEWS +M SoObjects/Mailer/SOGoMailFolder.m + +commit 0cea36df2eebdcda55098fa0ae9416976a39a332 +Author: Ludovic Marcotte +Date: Thu Mar 6 14:10:47 2014 -0500 + + Updated NEWS regarding previous commit + +M NEWS + +commit afd745232331267499592e18e5d0b857454d3cbd +Author: Ludovic Marcotte +Date: Thu Mar 6 14:05:59 2014 -0500 + + Fixed returned date format and fixing missing 'name part' in address + +M ActiveSync/SOGoMailObject+ActiveSync.m + +commit e4a21bcef5afb1245023d5561c0d60c183bfe623 +Author: Francis Lachapelle +Date: Thu Mar 6 09:27:43 2014 -0500 + + Webmail: fix encoding of subfolder name + + Fixes #2637 + +M NEWS +M SoObjects/Mailer/SOGoMailFolder.m +M UI/MailerUI/UIxMailFolderActions.m + +commit 0c99323db3e5404301c249512b736d426bd41d09 +Author: Francis Lachapelle +Date: Wed Mar 5 13:42:38 2014 -0500 + + Fix possible exception when retrieving reminder + + Fixes #2624 + +M NEWS +M UI/PreferencesUI/UIxPreferences.m + +commit da208d5b4acd18aff399261cafc9d105c8f56e55 +Author: Ludovic Marcotte +Date: Wed Mar 5 09:09:33 2014 -0500 + + Updated NEWS regarding previous commit + +M NEWS + +commit 158af711528027cd63a3c70708fab96eee41dd19 +Author: Ludovic Marcotte +Date: Wed Mar 5 09:07:39 2014 -0500 + + Fix for bug #2609 + +M ActiveSync/NSDate+ActiveSync.m + +commit 163bce39b5ab7afc060a5af9dfd7dafa632f7b61 +Author: Francis Lachapelle +Date: Tue Mar 4 22:03:28 2014 -0500 + + Fix list sorting of events by calendar name + + Fixes #2629 + +M NEWS +M UI/Templates/SchedulerUI/UIxCalMainView.wox + +commit 02c72fee6ad0bf8850de88ab65a01191ff351ecc +Author: Francis Lachapelle +Date: Tue Mar 4 21:32:57 2014 -0500 + + Fix unsubscription when renaming an IMAP folder + + Fixes #2630 + +M NEWS +M SoObjects/Mailer/SOGoMailFolder.m + +commit 8bef84bded384cde99dd2ee7ebfe9ebbeeedf2e6 +Author: Francis Lachapelle +Date: Tue Mar 4 09:22:00 2014 -0500 + + Update translations + +M NEWS +M UI/PreferencesUI/Czech.lproj/Localizable.strings +M UI/PreferencesUI/Finnish.lproj/Localizable.strings +M UI/PreferencesUI/Hungarian.lproj/Localizable.strings + +commit 8db3b22eb9bde326d3892c88b5c1cb9bb0251170 +Author: Francis Lachapelle +Date: Mon Mar 3 22:08:29 2014 -0500 + + Bump version to 2.2.0a + +M Version + +commit 1aabcf04b5d26471a62f97566bb3fd6911848f48 +Author: Francis Lachapelle +Date: Mon Mar 3 22:07:24 2014 -0500 + + Fix sogo-tool operations on Sieve script + + Fixes #2617 + +M NEWS +M SoObjects/Mailer/SOGoMailAccount.h +M SoObjects/Mailer/SOGoMailAccount.m +M SoObjects/SOGo/SOGoSieveManager.h +M SoObjects/SOGo/SOGoSieveManager.m +M Tools/GNUmakefile.preamble +M Tools/SOGoToolExpireAutoReply.m +M Tools/SOGoToolUserPreferences.m + +commit c6b227160c70db0fb892c2df1f5bb64caae45fc9 +Author: Francis Lachapelle +Date: Mon Feb 24 16:53:46 2014 -0500 + + Update ChangeLog + +M ChangeLog +M NEWS + commit 5f2920db9b1c7fd89af8019d8a007bfddb20a742 Author: Francis Lachapelle Date: Mon Feb 24 16:47:41 2014 -0500 diff --git a/Documentation/SOGo Installation Guide.odt b/Documentation/SOGo Installation Guide.odt index f7dd2f676e..c47a474f43 100644 Binary files a/Documentation/SOGo Installation Guide.odt and b/Documentation/SOGo Installation Guide.odt differ diff --git a/Documentation/SOGo Mobile Devices Configuration.odt b/Documentation/SOGo Mobile Devices Configuration.odt index bb85b0b93f..8799d8ba23 100644 Binary files a/Documentation/SOGo Mobile Devices Configuration.odt and b/Documentation/SOGo Mobile Devices Configuration.odt differ diff --git a/Documentation/SOGo Mozilla Thunderbird Configuration.odt b/Documentation/SOGo Mozilla Thunderbird Configuration.odt index 5f73e81c1d..6393d55a16 100644 Binary files a/Documentation/SOGo Mozilla Thunderbird Configuration.odt and b/Documentation/SOGo Mozilla Thunderbird Configuration.odt differ diff --git a/Documentation/SOGo Native Microsoft Outlook Configuration.odt b/Documentation/SOGo Native Microsoft Outlook Configuration.odt index eeb4d18532..e1c7144ec3 100644 Binary files a/Documentation/SOGo Native Microsoft Outlook Configuration.odt and b/Documentation/SOGo Native Microsoft Outlook Configuration.odt differ diff --git a/NEWS b/NEWS index 88fceeb4f9..e136b03b2b 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,24 @@ +2.2.1 (2014-03-07) +------------------ + +Enhancements + - updated Czech, Dutch, Finnish, and Hungarian translations + - show current folder name in prompt dialog when renaming a mail folder + +Bug fixes + - fixed an issue with ActiveSync when the number of messages in the mailbox was greater than the window-size specified by the client + - fixed sogo-tool operations on Sieve script (#2617) + - fixed unsubscription when renaming an IMAP folder (#2630) + - fixed sorting of events list by calendar name (#2629) + - fixed wrong date format leading to Android email syncing issues (#2609) + - fixed possible exception when retrieving the default event reminder value (#2624) + - fixed encoding of mail folder name when creating a subfolder (#2637) + - fixed returned date format for email messages in Active Sync + - fixed missing 'name part' in address for email messages in Active Sync + - fixed race condition when syncing huge amount of deleted messages over Active Sync + - fixed encoding of string as CSS identifier when the string starts with a digit + - fixed auto-completion popupmenu when UID is a digit + 2.2.0 (2014-02-24) ------------------ diff --git a/SoObjects/Mailer/SOGoMailAccount.h b/SoObjects/Mailer/SOGoMailAccount.h index cec85d61e4..2efc05fc1c 100644 --- a/SoObjects/Mailer/SOGoMailAccount.h +++ b/SoObjects/Mailer/SOGoMailAccount.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2009-2013 Inverse inc. + Copyright (C) 2009-2014 Inverse inc. Copyright (C) 2004-2005 SKYRIX Software AG This file is part of SOGo. @@ -71,6 +71,8 @@ typedef enum { - (id) getInboxQuota; - (BOOL) updateFilters; +- (BOOL) updateFiltersWithUsername: (NSString *) theUsername + andPassword: (NSString *) thePassword; - (NSArray *) identities; - (NSString *) signature; diff --git a/SoObjects/Mailer/SOGoMailAccount.m b/SoObjects/Mailer/SOGoMailAccount.m index 2beb53acbc..5f9a67c493 100644 --- a/SoObjects/Mailer/SOGoMailAccount.m +++ b/SoObjects/Mailer/SOGoMailAccount.m @@ -1,6 +1,6 @@ /* Copyright (C) 2004-2005 SKYRIX Software AG - Copyright (C) 2007-2013 Inverse inc. + Copyright (C) 2007-2014 Inverse inc. This file is part of SOGo. @@ -306,12 +306,18 @@ - (id) getInboxQuota } - (BOOL) updateFilters +{ + return [self updateFiltersWithUsername: nil andPassword: nil]; +} + +- (BOOL) updateFiltersWithUsername: (NSString *) theUsername + andPassword: (NSString *) thePassword { SOGoSieveManager *manager; manager = [SOGoSieveManager sieveManagerForUser: [context activeUser]]; - return [manager updateFiltersForAccount: self]; + return [manager updateFiltersForAccount: self withUsername: theUsername andPassword: thePassword]; } diff --git a/SoObjects/Mailer/SOGoMailAccounts.m b/SoObjects/Mailer/SOGoMailAccounts.m index 3d792d885c..ae175b00db 100644 --- a/SoObjects/Mailer/SOGoMailAccounts.m +++ b/SoObjects/Mailer/SOGoMailAccounts.m @@ -78,20 +78,23 @@ - (id) lookupName: (NSString *) _key { id obj; NSArray *accounts; + NSString *key; SOGoUser *user; int keyCount; + + key = [_key fromCSSIdentifier]; /* first check attributes directly bound to the application */ - obj = [super lookupName:_key inContext:_ctx acquire:NO]; + obj = [super lookupName:key inContext:_ctx acquire:NO]; if (!obj) { user = [SOGoUser userWithLogin: [self ownerInContext: nil]]; accounts = [user mailAccounts]; - keyCount = [_key intValue]; - if ([_key isEqualToString: [NSString stringWithFormat: @"%d", keyCount]] + keyCount = [key intValue]; + if ([key isEqualToString: [NSString stringWithFormat: @"%d", keyCount]] && keyCount > -1 && keyCount < [accounts count]) - obj = [SOGoMailAccount objectWithName: _key inContainer: self]; + obj = [SOGoMailAccount objectWithName: key inContainer: self]; else obj = [NSException exceptionWithHTTPStatus: 404 /* Not Found */]; } diff --git a/SoObjects/Mailer/SOGoMailFolder.m b/SoObjects/Mailer/SOGoMailFolder.m index d83a30917e..7f45ec814b 100644 --- a/SoObjects/Mailer/SOGoMailFolder.m +++ b/SoObjects/Mailer/SOGoMailFolder.m @@ -44,6 +44,7 @@ #import #import +#import #import #import @@ -293,19 +294,19 @@ - (NSException *) renameTo: (NSString *) newName destURL = [[NSURL alloc] initWithScheme: [imap4URL scheme] host: [imap4URL host] path: [NSString stringWithFormat: @"%@%@", - path, newName]]; + path, [newName stringByEncodingImap4FolderName]]]; [destURL autorelease]; error = [imap4 moveMailboxAtURL: imap4URL toURL: destURL]; if (!error) { - ASSIGN (imap4URL, nil); - ASSIGN (nameInContainer, - ([NSString stringWithFormat: @"folder%@", [newName asCSSIdentifier]])); - // We unsubscribe to the old one, and subscribe back to the new one [client subscribe: [destURL path]]; [client unsubscribe: [imap4URL path]]; + + ASSIGN (imap4URL, nil); + ASSIGN (nameInContainer, + ([NSString stringWithFormat: @"folder%@", [newName asCSSIdentifier]])); } } else @@ -994,7 +995,7 @@ - (BOOL) create if ([self imap4Connection]) { - error = [imap4 createMailbox: [self relativeImap4Name] + error = [imap4 createMailbox: [[self relativeImap4Name] stringByEncodingImap4FolderName] atURL: [container imap4URL]]; if (error) rc = NO; @@ -1939,8 +1940,11 @@ - (NSString *) davCollectionTagFromId: (NSString *) theId uid = [theId intValue]; result = [[imap4 client] fetchModseqForUid: uid]; modseq = [[[[result objectForKey: @"RawResponse"] objectForKey: @"fetch"] objectForKey: @"modseq"] intValue]; - - tag = [NSString stringWithFormat: @"%d-%d", uid, modseq-1]; + + if (modseq < 1) + modseq = 1; + + tag = [NSString stringWithFormat: @"%d-%d", uid, modseq]; } return tag; @@ -1998,7 +2002,7 @@ - (EOQualifier *) _nonDeletedQualifier // Check updated items // // -// . uid fetch 1:* (FLAGS) (changedsince 171) +// . uid fetch 1:* (UID) (changedsince 171) // // To get the modseq of a specific message: // @@ -2100,11 +2104,14 @@ - (NSArray *) syncTokenFieldsWithProperties: (NSArray *) theProperties // We fetch deleted ones if (highestmodseq > 0) { + id uid; + uids = [self fetchUIDsOfVanishedItems: highestmodseq]; for (i = 0; i < [uids count]; i++) { - d = [NSDictionary dictionaryWithObject: @"deleted" forKey: [uids objectAtIndex: i]]; + uid = [uids objectAtIndex: i]; + d = [NSDictionary dictionaryWithObject: @"deleted" forKey: uid]; [allTokens addObject: d]; } } diff --git a/SoObjects/SOGo/NSString+Utilities.m b/SoObjects/SOGo/NSString+Utilities.m index ba297cac74..25a9c403d8 100644 --- a/SoObjects/SOGo/NSString+Utilities.m +++ b/SoObjects/SOGo/NSString+Utilities.m @@ -332,8 +332,7 @@ - (void) _setupCSSEscaping (cssEscapingCount + 1) * sizeof (unichar)); for (count = 0; count < cssEscapingCount; count++) - *(cssEscapingCharacters + count) - = [[characters objectAtIndex: count] characterAtIndex: 0]; + *(cssEscapingCharacters + count) = [[characters objectAtIndex: count] characterAtIndex: 0]; *(cssEscapingCharacters + cssEscapingCount) = 0; } @@ -360,14 +359,20 @@ - (NSString *) asCSSIdentifier cssIdentifier = [NSMutableString string]; max = [self length]; - for (count = 0; count < max; count++) + if (max > 0) { - currentChar = [self characterAtIndex: count]; - idx = [self _cssCharacterIndex: currentChar]; - if (idx > -1) - [cssIdentifier appendString: cssEscapingStrings[idx]]; - else - [cssIdentifier appendFormat: @"%C", currentChar]; + if (isdigit([self characterAtIndex: 0])) + // A CSS identifier can't start with a digit; we add an underscore + [cssIdentifier appendString: @"_"]; + for (count = 0; count < max; count++) + { + currentChar = [self characterAtIndex: count]; + idx = [self _cssCharacterIndex: currentChar]; + if (idx > -1) + [cssIdentifier appendString: cssEscapingStrings[idx]]; + else + [cssIdentifier appendFormat: @"%C", currentChar]; + } } return cssIdentifier; @@ -397,7 +402,17 @@ - (NSString *) fromCSSIdentifier newString = [NSMutableString string]; max = [self length]; - for (count = 0; count < max - 2; count++) + count = 0; + if (max > 0 + && [self characterAtIndex: 0] == '_' + && isdigit([self characterAtIndex: 1])) + { + /* If the identifier starts with an underscore followed by a digit, + we remove the underscore */ + count = 1; + } + + for (; count < max - 2; count++) { currentChar = [self characterAtIndex: count]; if (currentChar == '_') diff --git a/SoObjects/SOGo/SOGoSieveManager.h b/SoObjects/SOGo/SOGoSieveManager.h index 783a948d81..a1c28fd561 100644 --- a/SoObjects/SOGo/SOGoSieveManager.h +++ b/SoObjects/SOGo/SOGoSieveManager.h @@ -1,9 +1,8 @@ /* SOGoSieveManager.h - this file is part of SOGo * - * Copyright (C) 2010-2011 Inverse inc. + * Copyright (C) 2010-2014 Inverse inc. * - * Author: Wolfgang Sourdeau - * Ludovic Marcotte + * Author: Inverse * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -47,8 +46,14 @@ - (NSString *) lastScriptError; - (NGSieveClient *) clientForAccount: (SOGoMailAccount *) theAccount; +- (NGSieveClient *) clientForAccount: (SOGoMailAccount *) theAccount + withUsername: (NSString *) theUsername + andPassword: (NSString *) thePassword; - (BOOL) updateFiltersForAccount: (SOGoMailAccount *) theAccount; +- (BOOL) updateFiltersForAccount: (SOGoMailAccount *) theAccount + withUsername: (NSString *) theUsername + andPassword: (NSString *) thePassword; @end diff --git a/SoObjects/SOGo/SOGoSieveManager.m b/SoObjects/SOGo/SOGoSieveManager.m index 72a4cfc257..765ad32d67 100644 --- a/SoObjects/SOGo/SOGoSieveManager.m +++ b/SoObjects/SOGo/SOGoSieveManager.m @@ -1,9 +1,8 @@ /* SOGoSieveManager.m - this file is part of SOGo * - * Copyright (C) 2010-2011 Inverse inc. + * Copyright (C) 2010-2014 Inverse inc. * - * Author: Wolfgang Sourdeau - * Ludovic Marcotte + * Author: Inverse * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -625,6 +624,16 @@ - (NSString *) lastScriptError // // - (NGSieveClient *) clientForAccount: (SOGoMailAccount *) theAccount +{ + return [self clientForAccount: theAccount withUsername: nil andPassword: nil]; +} + +// +// +// +- (NGSieveClient *) clientForAccount: (SOGoMailAccount *) theAccount + withUsername: (NSString *) theUsername + andPassword: (NSString *) thePassword { NSDictionary *result; NSString *login, *authname, *password; @@ -640,8 +649,16 @@ - (NGSieveClient *) clientForAccount: (SOGoMailAccount *) theAccount // Extract credentials from mail account login = [[theAccount imap4URL] user]; - authname = [[theAccount imap4URL] user]; - password = [theAccount imap4PasswordRenewed: NO]; + if (!theUsername && !thePassword) + { + authname = [[theAccount imap4URL] user]; + password = [theAccount imap4PasswordRenewed: NO]; + } + else + { + authname = theUsername; + password = thePassword; + } // We connect to our Sieve server and check capabilities, in order // to generate the right script, based on capabilities @@ -725,7 +742,7 @@ - (NGSieveClient *) clientForAccount: (SOGoMailAccount *) theAccount return nil; } - if (![[result valueForKey:@"result"] boolValue]) { + if (![[result valueForKey:@"result"] boolValue] && !theUsername && !thePassword) { NSLog(@"failure. Attempting with a renewed password (no authname supported)"); password = [theAccount imap4PasswordRenewed: YES]; result = [client login: login password: password]; @@ -741,10 +758,23 @@ - (NGSieveClient *) clientForAccount: (SOGoMailAccount *) theAccount return client; } + +// +// +// +- (BOOL) updateFiltersForAccount: (SOGoMailAccount *) theAccount +{ + return [self updateFiltersForAccount: theAccount + withUsername: nil + andPassword: nil]; +} + // // // - (BOOL) updateFiltersForAccount: (SOGoMailAccount *) theAccount + withUsername: (NSString *) theUsername + andPassword: (NSString *) thePassword { NSMutableArray *req; NSMutableString *script, *header; @@ -762,7 +792,7 @@ - (BOOL) updateFiltersForAccount: (SOGoMailAccount *) theAccount req = [NSMutableArray arrayWithCapacity: 15]; ud = [user userDefaults]; - client = [self clientForAccount: theAccount]; + client = [self clientForAccount: theAccount withUsername: theUsername andPassword: thePassword]; if (!client) return NO; @@ -888,7 +918,7 @@ - (BOOL) updateFiltersForAccount: (SOGoMailAccount *) theAccount // We put and activate the script only if we actually have a script // that does something... - if (b) + if (b && [script length]) { result = [client putScript: sieveScriptName script: script]; diff --git a/Tools/GNUmakefile.preamble b/Tools/GNUmakefile.preamble index 8f087f01c8..3c07002763 100644 --- a/Tools/GNUmakefile.preamble +++ b/Tools/GNUmakefile.preamble @@ -14,4 +14,4 @@ ADDITIONAL_LIB_DIRS += \ -L../OGoContentStore/$(GNUSTEP_OBJ_DIR)/ -lOGoContentStore \ -L../SOPE/GDLContentStore/$(GNUSTEP_OBJ_DIR)/ -lGDLContentStore \ -L../SOPE/NGCards/$(GNUSTEP_OBJ_DIR)/ -lNGCards \ - -L/usr/local/lib -L/usr/lib -lEOControl -lNGStreams -lNGMime -lNGExtensions + -L/usr/local/lib -L/usr/lib -lEOControl -lNGStreams -lNGMime -lNGExtensions -lNGObjWeb diff --git a/Tools/SOGoToolExpireAutoReply.m b/Tools/SOGoToolExpireAutoReply.m index ddfa3890d7..d3f600054f 100644 --- a/Tools/SOGoToolExpireAutoReply.m +++ b/Tools/SOGoToolExpireAutoReply.m @@ -36,13 +36,19 @@ #import +#import + #import #import "SOGo/SOGoCredentialsFile.h" +#import #import #import #import #import +#import +#import + #import "SOGoTool.h" @interface SOGoToolExpireAutoReply : SOGoTool @@ -80,12 +86,10 @@ - (BOOL) removeAutoReplyForLogin: (NSString *) theLogin { NSMutableDictionary *vacationOptions; SOGoUserDefaults *userDefaults; - SOGoSieveManager *manager; SOGoUser *user; BOOL result; user = [SOGoUser userWithLogin: theLogin]; - manager = [SOGoSieveManager sieveManagerForUser: user]; userDefaults = [user userDefaults]; vacationOptions = [[userDefaults vacationOptions] mutableCopy]; [vacationOptions autorelease]; @@ -96,10 +100,24 @@ - (BOOL) removeAutoReplyForLogin: (NSString *) theLogin if (result) { - result = [manager updateFiltersForLogin: theLogin - authname: theUsername - password: thePassword - account: nil]; + SOGoUserFolder *home; + SOGoMailAccounts *folder; + SOGoMailAccount *account; + WOContext *localContext; + Class SOGoMailAccounts_class; + + [[SOGoProductLoader productLoader] loadProducts: [NSArray arrayWithObject: @"Mailer.SOGo"]]; + SOGoMailAccounts_class = NSClassFromString(@"SOGoMailAccounts"); + + localContext = [WOContext context]; + [localContext setActiveUser: user]; + + home = [user homeFolderInContext: localContext]; + folder = [SOGoMailAccounts_class objectWithName: @"Mail" inContainer: home]; + account = [folder lookupName: @"0" inContext: localContext acquire: NO]; + [account setContext: localContext]; + + result = [account updateFiltersWithUsername: theUsername andPassword: thePassword]; if (!result) { // Can't update Sieve script -- Reactivate auto-reply diff --git a/Tools/SOGoToolUserPreferences.m b/Tools/SOGoToolUserPreferences.m index 3d1f982a2a..a6255d6f04 100644 --- a/Tools/SOGoToolUserPreferences.m +++ b/Tools/SOGoToolUserPreferences.m @@ -27,12 +27,18 @@ #import #import +#import +#import + #import +#import #import "SOGo/SOGoCredentialsFile.h" #import +#import #import #import -#import +#import +#import #import "SOGoTool.h" @@ -102,7 +108,6 @@ - (SOGoUserPreferencesCommand) _cmdFromString: (NSString *) theString // Vacation // - (BOOL) _updateSieveScripsForkey: (NSString *) theKey - manager: (SOGoSieveManager *) theManager login: (NSString *) theLogin { if ([theKey caseInsensitiveCompare: @"Forward"] == NSOrderedSame || @@ -126,11 +131,28 @@ - (BOOL) _updateSieveScripsForkey: (NSString *) theKey NSLog(@"To update Sieve scripts, you must provide the \"-p credentialFile\" parameter"); return NO; } - - return [theManager updateFiltersForLogin: theLogin - authname: authname - password: authpwd - account: nil]; + + /* update sieve script */ + SOGoUser *user; + SOGoUserFolder *home; + SOGoMailAccounts *folder; + SOGoMailAccount *account; + WOContext *localContext; + Class SOGoMailAccounts_class; + + [[SOGoProductLoader productLoader] loadProducts: [NSArray arrayWithObject: @"Mailer.SOGo"]]; + SOGoMailAccounts_class = NSClassFromString(@"SOGoMailAccounts"); + + user = [SOGoUser userWithLogin: theLogin]; + localContext = [WOContext context]; + [localContext setActiveUser: user]; + + home = [user homeFolderInContext: localContext]; + folder = [SOGoMailAccounts_class objectWithName: @"Mail" inContainer: home]; + account = [folder lookupName: @"0" inContext: localContext acquire: NO]; + [account setContext: localContext]; + + return [account updateFiltersWithUsername: authname andPassword: authpwd]; } return YES; @@ -154,7 +176,6 @@ - (BOOL) run if (max > 3) { SOGoDefaultsSource *source; - SOGoSieveManager *manager; SOGoUser *user; cmd = [self _cmdFromString: [sanitizedArguments objectAtIndex: 0]]; @@ -164,7 +185,6 @@ - (BOOL) run key = [sanitizedArguments objectAtIndex: 3]; user = [SOGoUser userWithLogin: userId]; - manager = [SOGoSieveManager sieveManagerForUser: user]; if ([type caseInsensitiveCompare: @"defaults"] == NSOrderedSame) source = [user userDefaults]; @@ -254,7 +274,6 @@ - (BOOL) run } rc = [self _updateSieveScripsForkey: key - manager: manager login: userId]; if (rc) [source synchronize]; @@ -266,7 +285,6 @@ - (BOOL) run case UserPreferencesUnset: [source removeObjectForKey: key]; rc = [self _updateSieveScripsForkey: key - manager: manager login: userId]; if (rc) [source synchronize]; diff --git a/UI/MailPartViewers/Dutch.lproj/Localizable.strings b/UI/MailPartViewers/Dutch.lproj/Localizable.strings index 1e8772b3d2..ca12065fea 100644 --- a/UI/MailPartViewers/Dutch.lproj/Localizable.strings +++ b/UI/MailPartViewers/Dutch.lproj/Localizable.strings @@ -12,6 +12,8 @@ publish_info_text = "De afzender stelt u op de hoogte van bijgevoegde afspraak." cancel_info_text = "Uw uitnodiging of de hele afspraak is vervallen.."; request_info_no_attendee = "stelt een afspraak voor met de volgende deelnemers. U ontvangt deze mail als notificatie, u bent geen deelnemer."; Appointment = "afspraak"; +"Status Update" = "Statusupdate"; +was = "was"; Organizer = "Organisator"; Time = "Tijd"; diff --git a/UI/MailerUI/UIxMailFolderActions.m b/UI/MailerUI/UIxMailFolderActions.m index 6e3c4e4d56..ebb7612a78 100644 --- a/UI/MailerUI/UIxMailFolderActions.m +++ b/UI/MailerUI/UIxMailFolderActions.m @@ -28,8 +28,11 @@ #import #import #import + #import #import +#import + #import #import @@ -60,6 +63,7 @@ - (WOResponse *) createFolderAction folderName = [[context request] formValueForKey: @"name"]; if ([folderName length] > 0) { + folderName = [folderName stringByEncodingImap4FolderName]; newFolder = [co lookupName: [NSString stringWithFormat: @"folder%@", folderName] inContext: context diff --git a/UI/PreferencesUI/Czech.lproj/Localizable.strings b/UI/PreferencesUI/Czech.lproj/Localizable.strings index 792dcab928..ab5e0cbd36 100644 --- a/UI/PreferencesUI/Czech.lproj/Localizable.strings +++ b/UI/PreferencesUI/Czech.lproj/Localizable.strings @@ -111,18 +111,22 @@ "personalCalendar" = "Osobní kalendář"; "firstCalendar" = "První kalendář"; +"reminder_NONE" = "Bez připomenutí"; "reminder_5_MINUTES_BEFORE" = "5 minut"; "reminder_10_MINUTES_BEFORE" = "10 minut"; "reminder_15_MINUTES_BEFORE" = "15 minut"; "reminder_30_MINUTES_BEFORE" = "30 minut"; +"reminder_45_MINUTES_BEFORE" = "45 minut"; "reminder_1_HOUR_BEFORE" = "1 hodina"; "reminder_2_HOURS_BEFORE" = "2 hodiny"; -"reminder_5_HOURS_BEFORE"= "5 hodiny"; -"reminder_15_HOURS_BEFORE"= "15 hodin"; +"reminder_5_HOURS_BEFORE" = "5 hodiny"; +"reminder_15_HOURS_BEFORE" = "15 hodin"; "reminder_1_DAY_BEFORE" = "1 den"; "reminder_2_DAYS_BEFORE" = "2 dny"; +"reminder_1_WEEK_BEFORE" = "1 týden"; /* Mailer */ +"Labels" = "Značky"; "Label" = "Označkovat"; "Show subscribed mailboxes only" = "Ukázat pouze odebírané mailové schránky"; "Sort messages by threads" = "Třídit zprávy podle souvislostí"; @@ -240,59 +244,56 @@ "Ask me" = "Zeptat se"; /* Filters - UIxPreferences */ -"Filters" = "Filters"; -"Active" = "Active"; -"Move Up" = "Move Up"; -"Move Down" = "Move Down"; +"Filters" = "Třídění"; +"Active" = "Aktivní"; +"Move Up" = "Posunout nahoru"; +"Move Down" = "Posunout dolů"; /* Filters - UIxFilterEditor */ -"Filter name:" = "Filter name:"; -"For incoming messages that" = "For incoming messages that"; -"match all of the following rules:" = "match all of the following rules:"; -"match any of the following rules:" = "match any of the following rules:"; -"match all messages" = "match all messages"; -"Perform these actions:" = "Perform these actions:"; +"Filter name:" = "Jméno filtru:"; +"For incoming messages that" = "Pro příchozí zprávy, které"; +"match all of the following rules:" = "vyhovují všem následujícím podmínkám:"; +"match any of the following rules:" = "vyhovují některé z následujících podmínek:"; +"match all messages" = "odpovídají všem zprávám"; +"Perform these actions:" = "Proveď tyto akce:"; "Untitled Filter" = "Nepojmenovaný filtr"; -"Subject" = "Subject"; -"From" = "From"; -"To" = "To"; -"Cc" = "Cc"; -"To or Cc" = "To or Cc"; -"Size (Kb)" = "Size (Kb)"; -"Header" = "Header"; -"Flag the message with:" = "Flag the message with:"; -"Discard the message" = "Discard the message"; -"File the message in:" = "File the message in:"; -"Keep the message" = "Keep the message"; -"Forward the message to:" = "Forward the message to:"; -"Send a reject message:" = "Send a reject message:"; -"Send a vacation message" = "Send a vacation message"; -"Stop processing filter rules" = "Stop processing filter rules"; - -"is under" = "is under"; -"is over" = "is over"; -"is" = "is"; +"Subject" = "Předmět"; +"From" = "Odesílatel"; +"To" = "Komu"; +"Cc" = "Kopie"; +"To or Cc" = "Komu nebo Kopie"; +"Size (Kb)" = "Velikost (Kb)"; +"Header" = "Hlavička"; +"Body" = "Tělo"; +"Flag the message with:" = "Označ zprávu jako:"; +"Discard the message" = "Odstraň zprávu"; +"File the message in:" = "Ulož zprávu do složky:"; +"Keep the message" = "Zprávu ponechej"; +"Forward the message to:" = "Přepošli zprávu na:"; +"Send a reject message:" = "Pošli zprávu s odmítnutím:"; +"Send a vacation message" = "Pošli odpověď v nepřítomnosti"; +"Stop processing filter rules" = "Ukonči zpracování"; + +"is under" = "je menší než"; +"is over" = "je větší než"; +"is" = "je rovno"; "is not" = "is not"; -"contains" = "contains"; -"does not contain" = "does not contain"; -"matches" = "matches"; -"does not match" = "does not match"; -"matches regex" = "matches regex"; -"does not match regex" = "does not match regex"; - -"Seen" = "Seen"; -"Deleted" = "Deleted"; -"Answered" = "Answered"; -"Flagged" = "Flagged"; -"Junk" = "Junk"; -"Not Junk" = "Not Junk"; -"Label 1" = "Label 1"; -"Label 2" = "Label 2"; -"Label 3" = "Label 3"; -"Label 4" = "Label 4"; -"Label 5" = "Label 5"; - +"contains" = "obsahuje"; +"does not contain" = "neobsahuje"; +"matches" = "odpovídá"; +"does not match" = "neodpovídá"; +"matches regex" = "odpovídá regulárnímu výrazu"; +"does not match regex" = "neodpovídá regulárnímu výrazu"; + +"Seen" = "Přečtené"; +"Deleted" = "Smazané"; +"Answered" = "Odpovězené"; +"Flagged" = "Oštítkované"; +"Junk" = "Nevyžádané"; +"Not Junk" = "Jako vyžádané"; + +/* Password policy */ "The password was changed successfully." = "Heslo bylo úspěšně změněno."; "Password must not be empty." = "Heslo nesmí být prázdné."; "The passwords do not match. Please try again." = "Hesla se neshodují. Prosím zadejte je znovu."; @@ -305,4 +306,4 @@ "Unhandled policy error: %{0}" = "Neošetřená chyba: %{0}"; "Unhandled error response" = "Neošetřená chyba"; "Password change is not supported." = "Změna hesla není podporována."; -"Unhandled HTTP error code: %{0}" = "Neošetřený HTTP chybový kód: %{0}"; +"Unhandled HTTP error code: %{0}" = "Neošetřený HTTP chybový kód: %{0}"; \ No newline at end of file diff --git a/UI/PreferencesUI/Dutch.lproj/Localizable.strings b/UI/PreferencesUI/Dutch.lproj/Localizable.strings index e74ce41f53..5ee5aaf490 100644 --- a/UI/PreferencesUI/Dutch.lproj/Localizable.strings +++ b/UI/PreferencesUI/Dutch.lproj/Localizable.strings @@ -111,18 +111,22 @@ "personalCalendar" = "Persoonlijke agenda"; "firstCalendar" = "Eerste ingeschakelde agenda"; +"reminder_NONE" = "Geen herinnering"; "reminder_5_MINUTES_BEFORE" = "5 minuten"; "reminder_10_MINUTES_BEFORE" = "10 minuten"; "reminder_15_MINUTES_BEFORE" = "15 minuten"; "reminder_30_MINUTES_BEFORE" = "30 minuten"; +"reminder_45_MINUTES_BEFORE" = "45 minuten van tevoren"; "reminder_1_HOUR_BEFORE" = "1 uur"; "reminder_2_HOURS_BEFORE" = "2 uren"; -"reminder_5_HOURS_BEFORE"= "5 uren"; -"reminder_15_HOURS_BEFORE"= "15 uren"; +"reminder_5_HOURS_BEFORE" = "5 uren"; +"reminder_15_HOURS_BEFORE" = "15 uren"; "reminder_1_DAY_BEFORE" = "1 dag"; "reminder_2_DAYS_BEFORE" = "2 dagen"; +"reminder_1_WEEK_BEFORE" = "1 week van tevoren"; /* Mailer */ +"Labels" = "Labels"; "Label" = "Labelen"; "Show subscribed mailboxes only" = "Toon alleen geabonneerde postvakken"; "Sort messages by threads" = "Berichten sorteren op threads"; @@ -261,6 +265,7 @@ "To or Cc" = "aan of cc"; "Size (Kb)" = "Grootte (Kb)"; "Header" = "Header"; +"Body" = "Inhoud"; "Flag the message with:" = "Markeer het bericht met:"; "Discard the message" = "Het bericht verwijderen"; "File the message in:" = "Verplaats het bericht naar:"; @@ -287,12 +292,8 @@ "Flagged" = "Gemarkeerd"; "Junk" = "Junk"; "Not Junk" = "Geen junk"; -"Label 1" = "Label 1"; -"Label 2" = "Label 2"; -"Label 3" = "Label 3"; -"Label 4" = "Label 4"; -"Label 5" = "Label 5"; +/* Password policy */ "The password was changed successfully." = "Het wachtwoord is met succes veranderd."; "Password must not be empty." = "Wachtwoord mag niet leeg zijn."; "The passwords do not match. Please try again." = "De wachtwoorden komen niet overeen. Probeer opnieuw."; @@ -305,4 +306,4 @@ "Unhandled policy error: %{0}" = "Onverwerkte beleidsfout: %{0}"; "Unhandled error response" = "Onverwerkte foutmelding"; "Password change is not supported." = "Wachtwoordwijziging wordt niet ondersteund."; -"Unhandled HTTP error code: %{0}" = "Onverwerkte HTTP-foutcode: %{0}"; +"Unhandled HTTP error code: %{0}" = "Onverwerkte HTTP-foutcode: %{0}"; \ No newline at end of file diff --git a/UI/PreferencesUI/Finnish.lproj/Localizable.strings b/UI/PreferencesUI/Finnish.lproj/Localizable.strings index d30f5cfe85..0931551a31 100644 --- a/UI/PreferencesUI/Finnish.lproj/Localizable.strings +++ b/UI/PreferencesUI/Finnish.lproj/Localizable.strings @@ -265,6 +265,7 @@ "To or Cc" = "Kenelle tai Kopio"; "Size (Kb)" = "Koko (Kb)"; "Header" = "Otsikko"; +"Body" = "Runko"; "Flag the message with:" = "Merkitse viesti:"; "Discard the message" = "Hylkää viesti"; "File the message in:" = "Arkistoi viesti:"; diff --git a/UI/PreferencesUI/Hungarian.lproj/Localizable.strings b/UI/PreferencesUI/Hungarian.lproj/Localizable.strings index a5fb508263..a200befbef 100644 --- a/UI/PreferencesUI/Hungarian.lproj/Localizable.strings +++ b/UI/PreferencesUI/Hungarian.lproj/Localizable.strings @@ -111,19 +111,23 @@ "personalCalendar" = "Személyes naptár"; "firstCalendar" = "Első engedélyezett naptár"; -"reminder_5_MINUTES_BEFORE" = "5 perc"; +"reminder_NONE" = "Nincs emlékeztető"; +"reminder_5_MINUTES_BEFORE" = "5 perccel előtte"; "reminder_10_MINUTES_BEFORE" = "10 perc"; -"reminder_15_MINUTES_BEFORE" = "15 perc"; +"reminder_15_MINUTES_BEFORE" = "15 perccel előtte"; "reminder_30_MINUTES_BEFORE" = "30 perc"; -"reminder_1_HOUR_BEFORE" = "1 óra"; -"reminder_2_HOURS_BEFORE" = "2 óra"; -"reminder_5_HOURS_BEFORE"= "5 óra"; -"reminder_15_HOURS_BEFORE"= "15 óra"; -"reminder_1_DAY_BEFORE" = "1 nap"; -"reminder_2_DAYS_BEFORE" = "2 nap"; +"reminder_45_MINUTES_BEFORE" = "45 perccel előtte"; +"reminder_1_HOUR_BEFORE" = "1 órával előtte"; +"reminder_2_HOURS_BEFORE" = "2 órával előtte"; +"reminder_5_HOURS_BEFORE" = "5 órával előtte"; +"reminder_15_HOURS_BEFORE" = "15 órával előtte"; +"reminder_1_DAY_BEFORE" = "1 nappal előtte"; +"reminder_2_DAYS_BEFORE" = "2 nappal előtte"; +"reminder_1_WEEK_BEFORE" = "1 héttel előtte"; /* Mailer */ -"Label" = "Cimke"; +"Labels" = "Címkék"; +"Label" = "Címke"; "Show subscribed mailboxes only" = "Csak azok a fiókok mutatása, amelyre feliratkozott"; "Sort messages by threads" = "Üzenetek beszélgetések szerinti rendezése "; "Check for new mail:" = "Új üzenetek letöltése:"; @@ -261,6 +265,7 @@ "To or Cc" = "Címzett vagy másolat"; "Size (Kb)" = "Méret (Kb)"; "Header" = "Fejléc"; +"Body" = "Levéltörzs"; "Flag the message with:" = "Üzenet címkézése ezzel:"; "Discard the message" = "Üzenet eldobása"; "File the message in:" = "Az üzenet alábbi mappába helyezése:"; @@ -287,12 +292,8 @@ "Flagged" = "Megcímkézett"; "Junk" = "Szemét"; "Not Junk" = "Nem szemét"; -"Label 1" = "Címke 1"; -"Label 2" = "Címke 2"; -"Label 3" = "Címke 3"; -"Label 4" = "Címke 4"; -"Label 5" = "Címke 5"; +/* Password policy */ "The password was changed successfully." = "A jelszó megváltoztatása sikeres."; "Password must not be empty." = "Jelszó nem lehet üres."; "The passwords do not match. Please try again." = "Jelszavak nem egyeznek meg. Kérem próbálja meg újra."; @@ -305,4 +306,4 @@ "Unhandled policy error: %{0}" = "Nem kezelt szabályrendszer hiba: %{0}"; "Unhandled error response" = "Nem kezelt hiba válasz"; "Password change is not supported." = "Jelszó változtatása nem támogatott."; -"Unhandled HTTP error code: %{0}" = "Nem kezelt HTTP hiba kód: %{0}"; +"Unhandled HTTP error code: %{0}" = "Nem kezelt HTTP hiba kód: %{0}"; \ No newline at end of file diff --git a/UI/PreferencesUI/UIxPreferences.m b/UI/PreferencesUI/UIxPreferences.m index 63798b11dd..7ba612cac2 100644 --- a/UI/PreferencesUI/UIxPreferences.m +++ b/UI/PreferencesUI/UIxPreferences.m @@ -571,10 +571,13 @@ - (NSString *) reminder int index; value = [userDefaults calendarDefaultReminder]; - index = [reminderValues indexOfObject: value]; + if (value != nil) + { + index = [reminderValues indexOfObject: value]; - if (index != NSNotFound) - return [reminderItems objectAtIndex: index]; + if (index != NSNotFound) + return [reminderItems objectAtIndex: index]; + } return @"NONE"; } diff --git a/UI/Scheduler/Dutch.lproj/Localizable.strings b/UI/Scheduler/Dutch.lproj/Localizable.strings index 5dbfad68b0..318eefd5eb 100644 --- a/UI/Scheduler/Dutch.lproj/Localizable.strings +++ b/UI/Scheduler/Dutch.lproj/Localizable.strings @@ -418,6 +418,7 @@ validate_endbeforestart = "Het einde is voor de begindatum."; "eventDeleteConfirmation" = "Weet u zeker dat u de volgende afspraken wilt verwijderen?"; "taskDeleteConfirmation" = "Weet u zeker dat u de volgende taken wilt verwijderen?"; +"Would you like to continue?" = "Wilt u doorgaan?"; "You cannot remove nor unsubscribe from your personal calendar." = "U kunt niet uw persoonlijke agenda verwijderen of opzeggen."; diff --git a/UI/Templates/SchedulerUI/UIxCalMainView.wox b/UI/Templates/SchedulerUI/UIxCalMainView.wox index e52795e930..f59426452e 100644 --- a/UI/Templates/SchedulerUI/UIxCalMainView.wox +++ b/UI/Templates/SchedulerUI/UIxCalMainView.wox @@ -165,7 +165,7 @@ - + diff --git a/UI/WebServerResources/JavascriptAPIExtensions.js b/UI/WebServerResources/JavascriptAPIExtensions.js index 53e65b26bc..d71b92a101 100644 --- a/UI/WebServerResources/JavascriptAPIExtensions.js +++ b/UI/WebServerResources/JavascriptAPIExtensions.js @@ -106,6 +106,10 @@ String.prototype.asCSSIdentifier = function() { newString = newString.replace(re, escapeds[i]); } + if (/^\d+/.test(newString)) { + newString = '_' + newString; + } + return newString; }; diff --git a/UI/WebServerResources/MailerUI.js b/UI/WebServerResources/MailerUI.js index 9b98b8d146..3102d23d4d 100644 --- a/UI/WebServerResources/MailerUI.js +++ b/UI/WebServerResources/MailerUI.js @@ -2309,7 +2309,8 @@ function onMenuCreateFolderConfirm(event) { } function onMenuRenameFolder(event) { - showPromptDialog(_("Rename Folder..."), _("Enter the new name of your folder :"), onMenuRenameFolderConfirm); + var folderName = document.menuTarget.down('.nodeName').childNodes[0].nodeValue; + showPromptDialog(_("Rename Folder..."), _("Enter the new name of your folder :"), onMenuRenameFolderConfirm, folderName); } function onMenuRenameFolderConfirm() { diff --git a/UI/WebServerResources/SOGoAutoCompletion.js b/UI/WebServerResources/SOGoAutoCompletion.js index 290b371b5d..45cf104242 100644 --- a/UI/WebServerResources/SOGoAutoCompletion.js +++ b/UI/WebServerResources/SOGoAutoCompletion.js @@ -167,10 +167,12 @@ var SOGoAutoCompletionInterface = { for (var i = 0; i < data.contacts.length; i++) { var contact = data.contacts[i]; var completeEmail = contact["c_cn"]; + var uid = "" + contact[this.uidField]; + var c_name = "" + contact['c_name']; if (contact["c_mail"]) completeEmail += " <" + contact["c_mail"] + ">"; var node = new Element('li', { 'address': completeEmail, - 'uid': contact[this.uidField] }); + 'uid': uid }); var matchPosition = completeEmail.toLowerCase().indexOf(data.searchText.toLowerCase()); if (matchPosition > -1) { var matchBefore = completeEmail.substring(0, matchPosition); @@ -184,7 +186,7 @@ var SOGoAutoCompletionInterface = { node.appendChild(document.createTextNode(completeEmail)); } list.appendChild(node); - if (contact['c_name'].endsWith (".vlf")) { + if (c_name.endsWith(".vlf")) { // Keep track of list containers node.writeAttribute("container", contact['container']); } @@ -211,6 +213,7 @@ var SOGoAutoCompletionInterface = { this.menu.setStyle({ top: top + "px", left: offset[0] + "px", height: height, + maxWidth: (window.width() - offset[0] - 12) + "px", visibility: "visible" }); this.menu.scrollTop = 0; @@ -225,8 +228,10 @@ var SOGoAutoCompletionInterface = { if (data.contacts.length == 1) { // Single result var contact = data.contacts[0]; - input.writeAttribute("uid", contact[this.uidField]); - if (contact['c_name'].endsWith(".vlf")) { + var uid = "" + contact[this.uidField]; + var c_name = "" + contact['c_name']; + input.writeAttribute("uid", uid); + if (c_name.endsWith(".vlf")) { this.writeAttribute("container", contact['container']); } var completeEmail = contact["c_cn"]; diff --git a/UI/WebServerResources/generic.css b/UI/WebServerResources/generic.css index c1e5169b86..1754d73f2e 100644 --- a/UI/WebServerResources/generic.css +++ b/UI/WebServerResources/generic.css @@ -251,6 +251,8 @@ DIV.contactSelector DIV.contactList padding-bottom: .15em; margin: 0px; width: auto; + overflow: hidden; + text-overflow: ellipsis; white-space: nowrap; cursor: pointer; } diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js index 89149d9a0d..f6a9e4888c 100644 --- a/UI/WebServerResources/generic.js +++ b/UI/WebServerResources/generic.js @@ -2157,7 +2157,10 @@ function _showPromptDialog(title, label, callback, defaultValue) { } if (Prototype.Browser.IE) jQuery('#bgDialogDiv').css('opacity', 0.4); - jQuery(dialog).fadeIn('fast', function () { dialog.down("input").focus(); }); + jQuery(dialog).fadeIn('fast', function () { + var input = dialog.down("input"); + input.selectText(0, input.value.length); + }); } function showSelectDialog(title, label, options, button, callbackFcn, callbackArg, defaultValue) { diff --git a/Version b/Version index f260ac6123..395f025147 100644 --- a/Version +++ b/Version @@ -4,4 +4,4 @@ MAJOR_VERSION=2 MINOR_VERSION=2 -SUBMINOR_VERSION=0 +SUBMINOR_VERSION=1