diff --git a/ActiveSync/NSData+ActiveSync.m b/ActiveSync/NSData+ActiveSync.m index 34fa4da95..7114403cc 100644 --- a/ActiveSync/NSData+ActiveSync.m +++ b/ActiveSync/NSData+ActiveSync.m @@ -33,6 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #import #import +#import #include #include @@ -48,7 +49,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. path = [NSString stringWithFormat: @"/tmp/%@.data", [[NSProcessInfo processInfo] globallyUniqueString]]; [self writeToFile: path atomically: YES]; - NSLog(@"Original data written to: %@", path); + [self errorWithFormat: @"Original data written to: %@", path]; } // @@ -81,7 +82,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. if (ret != WBXML_OK) { - NSLog(@"wbxml2xmlFromContent: failed: %s\n", wbxml_errors_string(ret)); + [self errorWithFormat: @"wbxml2xmlFromContent: failed: %s\n", wbxml_errors_string(ret)]; [self _dumpToFile]; return nil; } @@ -114,7 +115,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. if (ret != WBXML_OK) { - NSLog(@"xml2wbxmlFromContent: failed: %s\n", wbxml_errors_string(ret)); + [self logWithFormat: @"xml2wbxmlFromContent: failed: %s\n", wbxml_errors_string(ret)]; [self _dumpToFile]; return nil; } @@ -129,7 +130,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. if (ret != WBXML_OK) { - NSLog(@"xml2wbxmlFromContent: failed: %s\n", wbxml_errors_string(ret)); + [self errorWithFormat: @"xml2wbxmlFromContent: failed: %s\n", wbxml_errors_string(ret)]; [self _dumpToFile]; free(wbxml); wbxml_conv_xml2wbxml_destroy(conv); diff --git a/ActiveSync/SOGoActiveSyncDispatcher+Sync.m b/ActiveSync/SOGoActiveSyncDispatcher+Sync.m index 6a6f44d89..2c353f736 100644 --- a/ActiveSync/SOGoActiveSyncDispatcher+Sync.m +++ b/ActiveSync/SOGoActiveSyncDispatcher+Sync.m @@ -57,6 +57,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #import #import +#import #import #import @@ -287,9 +288,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. case ActiveSyncMailFolder: default: { - // FIXME - //continue; - NSLog(@"BLARG!"); + // FIXME - what to do? + [self errorWithFormat: @"Fatal error occured - tried to call -processSyncAddCommand: ... on a mail folder. We abort."]; abort(); } } @@ -1065,13 +1065,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. changeDetected: (BOOL *) changeDetected maxSyncResponseSize: (int) theMaxSyncResponseSize { - NSString *collectionId, *realCollectionId, *syncKey, *davCollectionTag, *bodyPreferenceType, *lastServerKey; + NSString *collectionId, *realCollectionId, *syncKey, *davCollectionTag, *bodyPreferenceType, *lastServerKey, *syncKeyInCache; SOGoMicrosoftActiveSyncFolderType folderType; id collection, value; NSMutableString *changeBuffer, *commandsBuffer; BOOL getChanges, first_sync; unsigned int windowSize, v, status; + NSMutableDictionary *folderMetadata; changeBuffer = [NSMutableString string]; commandsBuffer = [NSMutableString string]; @@ -1186,6 +1187,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [commandsBuffer appendFormat: @"%@", s]; } + folderMetadata = [self _folderMetadataForKey: [self _getNameInCache: collection withType: folderType]]; + // If we got any changes or if we have applied any commands // let's regenerate our SyncKey based on the collection tag. if ([changeBuffer length] || [commandsBuffer length]) @@ -1196,7 +1199,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. { // Use the SyncKey saved by processSyncGetChanges - if processSyncGetChanges is not called (because of getChanges=false) // SyncKey has the value of the previous sync operation. - davCollectionTag = [[self _folderMetadataForKey: [self _getNameInCache: collection withType: folderType]] objectForKey: @"SyncKey"]; + davCollectionTag = [folderMetadata objectForKey: @"SyncKey"]; if (!davCollectionTag) davCollectionTag = [collection davCollectionTag]; @@ -1206,8 +1209,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. } else { - if (folderType == ActiveSyncMailFolder && [syncKey isEqualToString: @"-1"]) - davCollectionTag = [collection davCollectionTag]; + // Make sure that client is updated with the right syncKey. - This keeps vtodo's and vevent's syncKey in sync. + syncKeyInCache = [folderMetadata objectForKey: @"SyncKey"]; + if (syncKeyInCache && !([davCollectionTag isEqualToString:syncKeyInCache])) + { + davCollectionTag = syncKeyInCache; + *changeDetected = YES; + } } // Generate the response buffer @@ -1228,7 +1236,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // MoreAvailable breaks Windows Mobile devices if not between and // https://social.msdn.microsoft.com/Forums/en-US/040b254e-f47e-4cc1-a397-6d8393cdb819/airsyncmoreavailable-breaks-windows-mobile-devices-what-am-i-doing-wrong?forum=os_exchangeprotocols - if ([[self _folderMetadataForKey: [self _getNameInCache: collection withType: folderType]] objectForKey: @"MoreAvailable"]) + if ([folderMetadata objectForKey: @"MoreAvailable"]) [theBuffer appendString: @""]; [theBuffer appendString: commandsBuffer]; @@ -1373,6 +1381,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. defaultInterval = [defaults maximumSyncInterval]; internalInterval = [defaults internalSyncInterval]; + // If the request doesn't contain "HeartbeatInterval" there is no reason to delay the response. + if (heartbeatInterval == 0) + heartbeatInterval = internalInterval = 1; + // We check to see if our heartbeat interval falls into the supported ranges. if (heartbeatInterval > defaultInterval || heartbeatInterval < 1) { @@ -1389,7 +1401,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. allCollections = (id)[theDocumentElement getElementsByTagName: @"Collection"]; // We enter our loop detection change - for (i = 0; i < (defaultInterval/internalInterval); i++) + for (i = 0; i < (heartbeatInterval/internalInterval); i++) { s = [NSMutableString string]; @@ -1405,13 +1417,17 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. if (changeDetected) { - NSLog(@"Change detected, we push the content."); + [self logWithFormat: @"Change detected, we push the content."]; break; } + else if (heartbeatInterval > 1) + { + [self logWithFormat: @"Sleeping %d seconds while detecting changes...", internalInterval]; + sleep(internalInterval); + } else { - NSLog(@"Sleeping %d seconds while detecting changes...", internalInterval); - sleep(internalInterval); + break; } } diff --git a/ActiveSync/SOGoActiveSyncDispatcher.m b/ActiveSync/SOGoActiveSyncDispatcher.m index 393e192b8..ff9321f92 100644 --- a/ActiveSync/SOGoActiveSyncDispatcher.m +++ b/ActiveSync/SOGoActiveSyncDispatcher.m @@ -59,6 +59,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #import #import #import +#import #import #import @@ -1805,30 +1806,24 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // We build the list of folders to "ping". When the payload is empty, we use the list // of "cached" folders. - allCollections = (id)[theDocumentElement getElementsByTagName: @"Folders"]; + allCollections = (id)[theDocumentElement getElementsByTagName: @"Folder"]; allFoldersID = [NSMutableArray array]; if (![allCollections count]) { - SOGoMailAccounts *accountsFolder; - SOGoMailAccount *accountFolder; - SOGoUserFolder *userFolder; - NSArray *allValues; + // We received an empty Ping request. Return status '3' to ask client to resend the request with complete body. + s = [NSMutableString string]; + [s appendString: @""]; + [s appendString: @""]; + [s appendString: @""]; + [s appendString: @"3"]; + [s appendString: @""]; - userFolder = [[context activeUser] homeFolderInContext: context]; - accountsFolder = [userFolder lookupName: @"Mail" inContext: context acquire: NO]; - accountFolder = [accountsFolder lookupName: @"0" inContext: context acquire: NO]; + d = [[s dataUsingEncoding: NSUTF8StringEncoding] xml2wbxml]; - allValues = [[accountFolder imapFolderGUIDs] allValues]; - - for (i = 0; i < [allValues count]; i++) - [allFoldersID addObject: [NSString stringWithFormat: @"mail/%@", [[allValues objectAtIndex: i] substringFromIndex: 6]]]; + [theResponse setContent: d]; - - // FIXME: handle multiple GCS collecitons - [allFoldersID addObject: @"vcard/personal"]; - [allFoldersID addObject: @"vevent/personal"]; - [allFoldersID addObject: @"vtodo/personal"]; + return; } else { @@ -1872,13 +1867,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. if ([foldersWithChanges count]) { - NSLog(@"Change detected, we push the content."); + [self logWithFormat: @"Change detected, we push the content."]; status = 2; break; } else { - NSLog(@"Sleeping %d seconds while detecting changes...", internalInterval); + [self logWithFormat: @"Sleeping %d seconds while detecting changes...", internalInterval]; sleep(internalInterval); } } @@ -2617,7 +2612,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [theResponse setHeader: @"14.1" forKey: @"MS-Server-ActiveSync"]; [theResponse setHeader: @"Sync,SendMail,SmartForward,SmartReply,GetAttachment,GetHierarchy,CreateCollection,DeleteCollection,MoveCollection,FolderSync,FolderCreate,FolderDelete,FolderUpdate,MoveItems,GetItemEstimate,MeetingResponse,Search,Settings,Ping,ItemOperations,ResolveRecipients,ValidateCert" forKey: @"MS-ASProtocolCommands"]; - [theResponse setHeader: @"2.0,2.1,2.5,12.0,12.1,14.0,14.1" forKey: @"MS-ASProtocolVersions"]; + [theResponse setHeader: @"2.5,12.0,12.1,14.0,14.1" forKey: @"MS-ASProtocolVersions"]; RELEASE(context); RELEASE(pool); diff --git a/ActiveSync/SoObjectWebDAVDispatcher+ActiveSync.m b/ActiveSync/SoObjectWebDAVDispatcher+ActiveSync.m index f45f2081a..7196ff002 100644 --- a/ActiveSync/SoObjectWebDAVDispatcher+ActiveSync.m +++ b/ActiveSync/SoObjectWebDAVDispatcher+ActiveSync.m @@ -61,7 +61,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [response setHeader: @"private" forKey: @"Cache-Control"]; [response setHeader: @"OPTIONS, POST" forKey: @"Allow"]; [response setHeader: @"14.1" forKey: @"MS-Server-ActiveSync"]; - [response setHeader: @"2.0,2.1,2.5,12.0,12.1,14.0,14.1" forKey: @"MS-ASProtocolVersions"]; + [response setHeader: @"2.5,12.0,12.1,14.0,14.1" forKey: @"MS-ASProtocolVersions"]; [response setHeader: @"Sync,SendMail,SmartForward,SmartReply,GetAttachment,GetHierarchy,CreateCollection,DeleteCollection,MoveCollection,FolderSync,FolderCreate,FolderDelete,FolderUpdate,MoveItems,GetItemEstimate,MeetingResponse,Search,Settings,Ping,ItemOperations,ResolveRecipients,ValidateCert" forKey: @"MS-ASProtocolCommands"]; [response setHeader: @"OPTIONS, POST" forKey: @"Public"]; } diff --git a/ChangeLog b/ChangeLog index d18933d3a..ab90551ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,139 @@ +commit d1d398091961f5d497b67313e098a8a5624089f4 +Author: Francis Lachapelle +Date: Fri Jan 30 11:03:38 2015 -0500 + + Update translations + +M NEWS +M UI/PreferencesUI/BrazilianPortuguese.lproj/Localizable.strings +M UI/PreferencesUI/Hungarian.lproj/Localizable.strings + +commit cf35eec1f5c56d8c7332bed34e2195a8ad9c9e9f +Author: Ludovic Marcotte +Date: Fri Jan 30 10:28:45 2015 -0500 + + Improved the NEWS file for the release + +M NEWS + +commit 58a0b0c173616db9a3a1592b437dba7e40475321 +Author: Ludovic Marcotte +Date: Fri Jan 30 10:23:04 2015 -0500 + + Updated for the release + +M NEWS + +commit 723a9d4e080644a7a8cef60de9b7450621f0964e +Author: Ludovic Marcotte +Date: Thu Jan 29 16:21:06 2015 -0500 + + Reverted bug fix from #3054 and added comment + +M SoObjects/SOGo/SOGoParentFolder.m + +commit 4cc158043eb6183ecefed7abd93b579afbdfd7f6 +Author: Francis Lachapelle +Date: Wed Jan 28 16:38:27 2015 -0500 + + Improve CSS server-side cleaner + + Fixes #3040 + +M UI/MailPartViewers/UIxMailPartHTMLViewer.m + +commit 7fd1564a86d50cc96995bd3dec44939741312f4a +Author: Ludovic Marcotte +Date: Wed Jan 28 15:16:21 2015 -0500 + + fix for #3076 + +M ActiveSync/SOGoActiveSyncDispatcher.m +M ActiveSync/SoObjectWebDAVDispatcher+ActiveSync.m +M Documentation/SOGoInstallationGuide.asciidoc +M NEWS + +commit 981c718d228f70a23e73d8db913234be7161166c +Author: Ludovic Marcotte +Date: Wed Jan 28 15:03:49 2015 -0500 + + improved handling of EAS Push when no heartbeat is provided + +M ActiveSync/SOGoActiveSyncDispatcher+Sync.m +M ActiveSync/SOGoActiveSyncDispatcher.m +M NEWS + +commit 086361b79a8be7722d8ae476140858067bb06c2a +Author: Ludovic Marcotte +Date: Fri Jan 23 16:16:36 2015 -0500 + + Avoid GNUstep warnings + +M SOPE/GDLContentStore/GCSFolderType.m +M UI/MailerUI/UIxMailEditor.m + +commit ab12c84887a663c0ec442cfa22b2c9fd1f737f24 +Author: Ludovic Marcotte +Date: Fri Jan 23 15:32:22 2015 -0500 + + More NSLog usage cleanups + +M SoObjects/Appointments/iCalCalendar+SOGo.m +M SoObjects/Mailer/NSData+Mail.h +M SoObjects/Mailer/NSData+Mail.m +M SoObjects/SOGo/BSONCodec.m +M SoObjects/SOGo/SOGoMailer.m +M SoObjects/SOGo/SOGoSieveManager.m +M SoObjects/SOGo/SOGoWebDAVAclManager.m + +commit e2bee230217d16287883fb595d7bfc7ddec0ff77 +Author: Ludovic Marcotte +Date: Thu Jan 22 16:25:16 2015 -0500 + + Avoid unnecessary calls to NSLog + +M UI/Contacts/UIxListView.m +M UI/MailPartViewers/UIxMailPartHTMLViewer.m +M UI/MailerUI/UIxMailView.m +M UI/Scheduler/UIxCalView.m +M UI/Scheduler/UIxComponentEditor.m + +commit 1a10599369da87e64b77cf110624ca6745605585 +Author: Ludovic Marcotte +Date: Thu Jan 22 15:39:57 2015 -0500 + + Removed unnecessary NSLog calls + +M SOPE/NGCards/CardGroup.m +M SOPE/NGCards/IcalResponse.m +M SOPE/NGCards/NSCalendarDate+ICal.m +M SOPE/NGCards/NSString+NGCards.m +M SOPE/NGCards/iCalObject.m + +commit d907d5d268b470c7f461cb0b7951b894e4b77772 +Author: Ludovic Marcotte +Date: Thu Jan 22 13:31:31 2015 -0500 + + Avoid using NSLog() where we can + +M ActiveSync/NSData+ActiveSync.m +M ActiveSync/SOGoActiveSyncDispatcher+Sync.m +M ActiveSync/SOGoActiveSyncDispatcher.m +M Main/SOGo.m +M Main/sogod.m + +commit d98ff69fbee723ae268b0cb0836c8dca75394743 +Author: Ludovic Marcotte +Date: Tue Jan 20 08:35:10 2015 -0500 + + Version bumps for the release + +M ChangeLog +M Documentation/docinfo.xml +M Documentation/includes/global-attributes.asciidoc +M NEWS +M Version + commit daa7ab87d7de8553c4df8790a10f18dead51e61f Author: Ludovic Marcotte Date: Mon Jan 19 13:54:04 2015 -0500 diff --git a/Documentation/SOGoInstallationGuide.asciidoc b/Documentation/SOGoInstallationGuide.asciidoc index 0b2f94f21..e88affe42 100644 --- a/Documentation/SOGoInstallationGuide.asciidoc +++ b/Documentation/SOGoInstallationGuide.asciidoc @@ -2417,9 +2417,6 @@ have unexpected behaviour with various ActiveSync clients. Please be aware of the following limitations: -* When creating an Outlook 2013 profile, you must actually kill Outlook -before the end of the creation process. See http://www.vionblog.com/connect-zimbra-community-with-outlook-2013 -for a procedure example. * Outlook 2013 does not search the GAL. One possible alternative solution is to configure Outlook to use a LDAP server (over SSL) with authentication. Outlook 2013 also does not seem to support multiple diff --git a/Documentation/docinfo.xml b/Documentation/docinfo.xml index e3f9dc1b8..00fc54948 100644 --- a/Documentation/docinfo.xml +++ b/Documentation/docinfo.xml @@ -1,7 +1,7 @@ -Version 2.2.14 - January 2015 -for version 2.2.14 -2015-01-20 +Version 2.2.15 - January 2015 +for version 2.2.15 +2015-01-30 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". diff --git a/Documentation/includes/global-attributes.asciidoc b/Documentation/includes/global-attributes.asciidoc index db6c0f09c..0cbd771ae 100644 --- a/Documentation/includes/global-attributes.asciidoc +++ b/Documentation/includes/global-attributes.asciidoc @@ -13,6 +13,6 @@ // TODO have the build system take care of this -:release_version: 2.2.14 +:release_version: 2.2.15 // vim: set syntax=asciidoc tabstop=2 shiftwidth=2 expandtab: diff --git a/Main/SOGo.m b/Main/SOGo.m index c3b015771..8e8959b2c 100644 --- a/Main/SOGo.m +++ b/Main/SOGo.m @@ -245,7 +245,7 @@ static BOOL debugLeaks; } else { - NSLog (@"No value specified for '%@'", *urlString); + [self errorWithFormat: @"No value specified for '%@'", *urlString]; ok = NO; } } @@ -441,7 +441,7 @@ static BOOL debugLeaks; if (debugLeaks) { if (debugOn) - NSLog (@"allocated classes:\n%s", GSDebugAllocationList (YES)); + [self logWithFormat: @"allocated classes:\n%s", GSDebugAllocationList (YES)]; else { debugOn = YES; diff --git a/Main/sogod.m b/Main/sogod.m index 4a123b938..4d6a488ae 100644 --- a/Main/sogod.m +++ b/Main/sogod.m @@ -1,15 +1,15 @@ /* Copyright (C) 2004-2005 SKYRIX Software AG - Copyright (C) 2006-2009 Inverse inc. + Copyright (C) 2006-2015 Inverse inc. - This file is part of OpenGroupware.org. + This file is part of SOGo. - OGo is free software; you can redistribute it and/or modify it under + SOGo is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - OGo is distributed in the hope that it will be useful, but WITHOUT ANY + SOGo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. diff --git a/NEWS b/NEWS index 047e7ea08..8177e4989 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,13 @@ +2.2.15 (2015-01-30) +------------------- + +Enhancements + - improved handling of EAS Push when no heartbeat is provided + - no longer need to kill Outlook 2013 when creating EAS profiles (#3076) + - improved server-side CSS cleaner (#3040) + - unified the logging messages in sogo.log file (#2534/#3063) + - updated Brazilian (Portuguese) and Hungarian translations + 2.2.14 (2015-01-20) ------------------- diff --git a/SOPE/GDLContentStore/GCSFolderType.m b/SOPE/GDLContentStore/GCSFolderType.m index bb99051e6..e26c988dd 100644 --- a/SOPE/GDLContentStore/GCSFolderType.m +++ b/SOPE/GDLContentStore/GCSFolderType.m @@ -20,6 +20,7 @@ */ #import +#import #import #import @@ -147,7 +148,7 @@ if ([keys count] == 0) return folderQualifier; - bindings = [_folder valuesForKeys:keys]; + bindings = [_folder dictionaryWithValuesForKeys:keys]; return [folderQualifier qualifierWithBindings:bindings requiresAllVariables:NO]; } diff --git a/SOPE/NGCards/CardGroup.m b/SOPE/NGCards/CardGroup.m index c9ecfb1f3..b3c21e9d9 100644 --- a/SOPE/NGCards/CardGroup.m +++ b/SOPE/NGCards/CardGroup.m @@ -59,8 +59,10 @@ static NGCardsSaxHandler *sax = nil; [parser setErrorHandler:sax]; } else - NSLog(@"ERROR(%s): did not find a parser for text/x-vcard!", - __PRETTY_FUNCTION__); + { + //NSLog(@"ERROR(%s): did not find a parser for text/x-vcard!", + // __PRETTY_FUNCTION__); + } } return parser; @@ -170,8 +172,8 @@ static NGCardsSaxHandler *sax = nil; { if (![aChild isKindOfClass: mappedClass]) { - NSLog (@"warning: new child to entity '%@': '%@' converted to '%@'", - tag, childTag, NSStringFromClass(mappedClass)); + //NSLog (@"warning: new child to entity '%@': '%@' converted to '%@'", + // tag, childTag, NSStringFromClass(mappedClass)); newChild = [aChild elementWithClass: mappedClass]; } } diff --git a/SOPE/NGCards/IcalResponse.m b/SOPE/NGCards/IcalResponse.m index 843fe43e1..0caddae52 100644 --- a/SOPE/NGCards/IcalResponse.m +++ b/SOPE/NGCards/IcalResponse.m @@ -54,7 +54,7 @@ - (BOOL)appendLine:(NSString *)_line { if (self->isFinished) { - NSLog(@"WARNING[%s]: already finished!", __PRETTY_FUNCTION__); + //NSLog(@"WARNING[%s]: already finished!", __PRETTY_FUNCTION__); return NO; } // limit length to 75 chars diff --git a/SOPE/NGCards/NSCalendarDate+ICal.m b/SOPE/NGCards/NSCalendarDate+ICal.m index 3363d2f3b..4e6d529b6 100644 --- a/SOPE/NGCards/NSCalendarDate+ICal.m +++ b/SOPE/NGCards/NSCalendarDate+ICal.m @@ -77,8 +77,8 @@ static NSString *gmtcalfmt = @"%Y%m%dT%H%M%SZ"; return [self icalStringInGMT]; else { /* not in GMT */ - NSLog(@"WARNING(%s): arbitary timezones not supported yet: %@", - __PRETTY_FUNCTION__, _tz); + //NSLog(@"WARNING(%s): arbitary timezones not supported yet: %@", + // __PRETTY_FUNCTION__, _tz); return [self icalStringInGMT]; } } diff --git a/SOPE/NGCards/NSString+NGCards.m b/SOPE/NGCards/NSString+NGCards.m index 8eef43074..9e851ac2e 100644 --- a/SOPE/NGCards/NSString+NGCards.m +++ b/SOPE/NGCards/NSString+NGCards.m @@ -276,7 +276,9 @@ } } else - NSLog(@"Cannot parse iCal duration value: '%@'", self); + { + //NSLog(@"Cannot parse iCal duration value: '%@'", self); + } if (isNegative) ti = -ti; diff --git a/SOPE/NGCards/iCalObject.m b/SOPE/NGCards/iCalObject.m index af13798b1..485bd8be6 100644 --- a/SOPE/NGCards/iCalObject.m +++ b/SOPE/NGCards/iCalObject.m @@ -59,8 +59,8 @@ static NSTimeZone *defTZ = nil; [self takeValue:_value forXKey:_key]; } else { - NSLog(@"0x%08x[%@]: ignoring attempt to set unbound key '%@'", - self, NSStringFromClass([self class]), _key); + //NSLog(@"0x%08x[%@]: ignoring attempt to set unbound key '%@'", + // self, NSStringFromClass([self class]), _key); } } diff --git a/SoObjects/Appointments/iCalCalendar+SOGo.m b/SoObjects/Appointments/iCalCalendar+SOGo.m index 74d660835..5127ead44 100644 --- a/SoObjects/Appointments/iCalCalendar+SOGo.m +++ b/SoObjects/Appointments/iCalCalendar+SOGo.m @@ -93,7 +93,7 @@ element = [elements objectAtIndex: 0]; else { - NSLog(@"ERROR: given calendar contains no elements: %@", self); + //NSLog(@"ERROR: given calendar contains no elements: %@", self); element = nil; } diff --git a/SoObjects/Mailer/NSData+Mail.h b/SoObjects/Mailer/NSData+Mail.h index 7258be786..7be5af1a4 100644 --- a/SoObjects/Mailer/NSData+Mail.h +++ b/SoObjects/Mailer/NSData+Mail.h @@ -1,8 +1,6 @@ /* NSData+Mail.h - this file is part of SOGo * - * Copyright (C) 2007 Inverse inc. - * - * Author: Wolfgang Sourdeau + * Copyright (C) 2007-2015 Inverse inc. * * 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 diff --git a/SoObjects/Mailer/NSData+Mail.m b/SoObjects/Mailer/NSData+Mail.m index d54f28b3a..92f379ec4 100644 --- a/SoObjects/Mailer/NSData+Mail.m +++ b/SoObjects/Mailer/NSData+Mail.m @@ -1,9 +1,6 @@ /* NSData+Mail.m - this file is part of SOGo * - * Copyright (C) 2007-2008 Inverse inc. - * - * Author: Wolfgang Sourdeau - * Ludovic Marcotte + * Copyright (C) 2007-2015 Inverse inc. * * 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 @@ -52,7 +49,7 @@ else { decodedData = nil; - NSLog (@"encoding '%@' unknown, returning nil data", realEncoding); + //NSLog (@"encoding '%@' unknown, returning nil data", realEncoding); } } else diff --git a/SoObjects/SOGo/BSONCodec.m b/SoObjects/SOGo/BSONCodec.m index a55eede3c..99eee87c4 100644 --- a/SoObjects/SOGo/BSONCodec.m +++ b/SoObjects/SOGo/BSONCodec.m @@ -11,6 +11,8 @@ #import #import +#import + static NSMutableDictionary *timezoneCache = nil; #define BSONTYPE(tag,className) [className class], [NSNumber numberWithChar: (tag)] @@ -604,7 +606,7 @@ static NSDictionary *BSONTypes() if (tz) [timezoneCache setObject: tz forKey: key]; else - NSLog(@"ERROR: timezone (%@) not found when deserializing BSON data", key); + [self errorWithFormat: @"BSON error: timezone (%@) not found when deserializing BSON data", key]; } return [NSCalendarDate dateWithYear: year diff --git a/SoObjects/SOGo/SOGoMailer.m b/SoObjects/SOGo/SOGoMailer.m index 413c29a96..edf341bfc 100644 --- a/SoObjects/SOGo/SOGoMailer.m +++ b/SoObjects/SOGo/SOGoMailer.m @@ -1,6 +1,6 @@ /* SOGoMailer.m - this file is part of SOGo * - * Copyright (C) 2007-2014 Inverse inc. + * Copyright (C) 2007-2015 Inverse inc. * * 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 @@ -213,7 +213,7 @@ } NS_HANDLER { - NSLog(@"Could not connect to the SMTP server %@ on port %d", host, port); + [self errorWithFormat: @"Could not connect to the SMTP server %@ on port %d", host, port]; result = [NSException exceptionWithHTTPStatus: 500 reason: @"cannot send message:" @" (smtp) error when connecting"]; diff --git a/SoObjects/SOGo/SOGoParentFolder.m b/SoObjects/SOGo/SOGoParentFolder.m index c0b44c5a4..501f90f9f 100644 --- a/SoObjects/SOGo/SOGoParentFolder.m +++ b/SoObjects/SOGo/SOGoParentFolder.m @@ -297,8 +297,14 @@ static SoSecurityManager *sm = nil; // This is important because user A could delete folder X, and user B has subscribed to it. // If the "default roles" are enabled for calendars/address books, -validatePersmission:.. will // work (grabbing the default role) and the deleted resource will be incorrectly returned. + // + // FIXME - 2015/01/29 - this fix (24c6c8c91d421594bd51f07904d4cd3911cd187c) was reverted. Normally, we should add + // [subscribedFolder ocsFolderForPath: [subscribedFolder ocsPath]] to check the existence of the folder but it causes + // massive SQL traffic. + // + // The proper fix would be to check upon login and only upon login if GCS folders that we're subscribed to are still existent. + // if (subscribedFolder - && [subscribedFolder ocsFolderForPath: [subscribedFolder ocsPath]] && ![sm validatePermission: SOGoPerm_AccessObject onObject: subscribedFolder inContext: context]) diff --git a/SoObjects/SOGo/SOGoSieveManager.m b/SoObjects/SOGo/SOGoSieveManager.m index 7c335109f..2f949ad20 100644 --- a/SoObjects/SOGo/SOGoSieveManager.m +++ b/SoObjects/SOGo/SOGoSieveManager.m @@ -1,6 +1,6 @@ /* SOGoSieveManager.m - this file is part of SOGo * - * Copyright (C) 2010-2014 Inverse inc. + * Copyright (C) 2010-2015 Inverse inc. * * Author: Inverse * @@ -31,6 +31,7 @@ #import #import +#import #import #import @@ -717,7 +718,7 @@ static NSString *sieveScriptName = @"sogo"; client = [[NGSieveClient alloc] initWithURL: url]; if (!client) { - NSLog(@"Sieve connection failed on %@", [url description]); + [self errorWithFormat: @"Sieve connection failed on %@", [url description]]; return nil; } @@ -738,19 +739,19 @@ static NSString *sieveScriptName = @"sogo"; if (!connected) { - NSLog(@"Sieve connection failed on %@", [url description]); + [self errorWithFormat: @"Sieve connection failed on %@", [url description]]; return nil; } if (![[result valueForKey:@"result"] boolValue] && !theUsername && !thePassword) { - NSLog(@"failure. Attempting with a renewed password (no authname supported)"); + [self logWithFormat: @"failure. Attempting with a renewed password (no authname supported)"]; password = [theAccount imap4PasswordRenewed: YES]; result = [client login: login password: password]; } if (![[result valueForKey:@"result"] boolValue]) { - NSLog(@"Could not login '%@' on Sieve server: %@: %@", - login, client, result); + [self logWithFormat: @"Could not login '%@' on Sieve server: %@: %@", + login, client, result]; [client closeConnection]; return nil; } @@ -823,7 +824,7 @@ static NSString *sieveScriptName = @"sogo"; } else { - NSLog(@"Sieve generation failure: %@", [self lastScriptError]); + [self errorWithFormat: @"Sieve generation failure: %@", [self lastScriptError]]; [client closeConnection]; return NO; } @@ -913,7 +914,7 @@ static NSString *sieveScriptName = @"sogo"; result = [client deleteScript: sieveScriptName]; if (![[result valueForKey:@"result"] boolValue]) { - NSLog(@"WARNING: Could not delete Sieve script - continuing...: %@", result); + [self logWithFormat: @"WARNING: Could not delete Sieve script - continuing...: %@", result]; } // We put and activate the script only if we actually have a script @@ -923,14 +924,14 @@ static NSString *sieveScriptName = @"sogo"; result = [client putScript: sieveScriptName script: script]; if (![[result valueForKey:@"result"] boolValue]) { - NSLog(@"Could not upload Sieve script: %@", result); + [self logWithFormat: @"Could not upload Sieve script: %@", result]; [client closeConnection]; return NO; } result = [client setActiveScript: sieveScriptName]; if (![[result valueForKey:@"result"] boolValue]) { - NSLog(@"Could not enable Sieve script: %@", result); + [self logWithFormat: @"Could not enable Sieve script: %@", result]; [client closeConnection]; return NO; } diff --git a/SoObjects/SOGo/SOGoWebDAVAclManager.m b/SoObjects/SOGo/SOGoWebDAVAclManager.m index 1c410512a..dcc4210df 100644 --- a/SoObjects/SOGo/SOGoWebDAVAclManager.m +++ b/SoObjects/SOGo/SOGoWebDAVAclManager.m @@ -1,8 +1,6 @@ /* SOGoWebDAVAclManager.m - this file is part of SOGo * - * Copyright (C) 2008 Inverse inc. - * - * Author: Wolfgang Sourdeau + * Copyright (C) 2008-2015 Inverse inc. * * 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 diff --git a/UI/Contacts/UIxListView.m b/UI/Contacts/UIxListView.m index c4499dfd9..1e3547686 100644 --- a/UI/Contacts/UIxListView.m +++ b/UI/Contacts/UIxListView.m @@ -106,7 +106,7 @@ acquire: NO]; if ([test isKindOfClass: [NSException class]]) { - NSLog (@"%@ not found", [card reference]); + //NSLog (@"%@ not found", [card reference]); cardCopy = [card copy]; [invalid addObject: cardCopy]; [cardCopy release]; diff --git a/UI/MailPartViewers/UIxMailPartHTMLViewer.m b/UI/MailPartViewers/UIxMailPartHTMLViewer.m index 09d48ae5a..ca41c7f62 100644 --- a/UI/MailPartViewers/UIxMailPartHTMLViewer.m +++ b/UI/MailPartViewers/UIxMailPartHTMLViewer.m @@ -272,7 +272,7 @@ static NSData* _sanitizeContent(NSData *theData) if ([tag caseInsensitiveCompare: found_tag] == NSOrderedSame) { // Remove the leading slash - NSLog(@"Found void tag with invalid leading slash: ", found_tag); + //NSLog(@"Found void tag with invalid leading slash: ", found_tag); i--; [d replaceBytesInRange: NSMakeRange(i, 1) withBytes: NULL @@ -455,6 +455,10 @@ static NSData* _sanitizeContent(NSData *theData) { if (*currentChar == '{') inCSSDeclaration = YES; + if (*currentChar == '}') + // CSS syntax error: ending declaration character while not in a CSS declaration. + // Ignore eveything from last CSS declaration. + start = currentChar + 1; else if (*currentChar == ',') hasEmbeddedCSS = NO; else if (!hasEmbeddedCSS) diff --git a/UI/MailerUI/UIxMailEditor.m b/UI/MailerUI/UIxMailEditor.m index 5c0a7a661..80c29f512 100644 --- a/UI/MailerUI/UIxMailEditor.m +++ b/UI/MailerUI/UIxMailEditor.m @@ -436,7 +436,7 @@ static NSArray *infoKeys = nil; - (NSDictionary *) storeInfo { [self debugWithFormat:@"storing info ..."]; - return [self valuesForKeys: infoKeys]; + return [self dictionaryWithValuesForKeys: infoKeys]; } /* contacts search */ diff --git a/UI/MailerUI/UIxMailView.m b/UI/MailerUI/UIxMailView.m index 8b6ec9218..110fac61b 100644 --- a/UI/MailerUI/UIxMailView.m +++ b/UI/MailerUI/UIxMailView.m @@ -77,7 +77,7 @@ static NSString *mailETag = nil; SOGO_MAJOR_VERSION, SOGO_MINOR_VERSION, SOGO_SUBMINOR_VERSION]; - NSLog (@"Note: using constant etag for mail viewer: '%@'", mailETag); + //NSLog (@"Note: using constant etag for mail viewer: '%@'", mailETag); } - (void) dealloc diff --git a/UI/PreferencesUI/BrazilianPortuguese.lproj/Localizable.strings b/UI/PreferencesUI/BrazilianPortuguese.lproj/Localizable.strings index 7e3c88b2d..01dc12d01 100644 --- a/UI/PreferencesUI/BrazilianPortuguese.lproj/Localizable.strings +++ b/UI/PreferencesUI/BrazilianPortuguese.lproj/Localizable.strings @@ -153,6 +153,9 @@ "displayremoteinlineimages_never" = "Nunca"; "displayremoteinlineimages_always" = "Sempre"; +"Auto save every" = "Auto salvar cada"; +"minutes" = "minutos"; + /* Contact */ "Personal Address Book" = "Catálogo Pessoal"; "Collected Address Book" = "Catálogo Coletado"; diff --git a/UI/PreferencesUI/Hungarian.lproj/Localizable.strings b/UI/PreferencesUI/Hungarian.lproj/Localizable.strings index 6bff739fb..9532bf3b3 100644 --- a/UI/PreferencesUI/Hungarian.lproj/Localizable.strings +++ b/UI/PreferencesUI/Hungarian.lproj/Localizable.strings @@ -153,6 +153,9 @@ "displayremoteinlineimages_never" = "Soha"; "displayremoteinlineimages_always" = "Mindig"; +"Auto save every" = "Automatikus mentés gyakorisága"; +"minutes" = "perc"; + /* Contact */ "Personal Address Book" = "Személyes címjegyzék"; "Collected Address Book" = "Összegyűjtöt címek jegyzéke"; diff --git a/UI/Scheduler/UIxCalView.m b/UI/Scheduler/UIxCalView.m index bbf7b4608..40677b6e9 100644 --- a/UI/Scheduler/UIxCalView.m +++ b/UI/Scheduler/UIxCalView.m @@ -1,8 +1,6 @@ /* UIxCalView.m - this file is part of SOGo * - * Copyright (C) 2006-2009 Inverse inc. - * - * Author: Wolfgang Sourdeau + * Copyright (C) 2006-2015 Inverse inc. * * 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 @@ -584,7 +582,7 @@ [uri appendString: @"Groups/_custom_"]; [uri appendString: uidsString]; [uri appendString: @"/"]; - NSLog (@"Group URI = '%@'", uri); + //NSLog (@"Group URI = '%@'", uri); } else { diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index 35a29219a..c1d666e63 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -1,6 +1,6 @@ /* UIxComponentEditor.m - this file is part of SOGo * - * Copyright (C) 2006-2014 Inverse inc. + * Copyright (C) 2006-2015 Inverse inc. * * 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 @@ -594,7 +594,7 @@ iRANGE(2); ASSIGN (reminderUnit, @"MINUTES"); break; default: - NSLog(@"Cannot process duration unit: '%c'", c); + //NSLog(@"Cannot process duration unit: '%c'", c); break; } } @@ -1887,7 +1887,9 @@ RANGE(2); [component setAttendees: newAttendees]; } else - NSLog(@"Error scanning following JSON:\n%@", json); + { + //NSLog(@"Error scanning following JSON:\n%@", json); + } } } diff --git a/Version b/Version index b651985e2..13e56d03b 100644 --- a/Version +++ b/Version @@ -4,4 +4,4 @@ MAJOR_VERSION=2 MINOR_VERSION=2 -SUBMINOR_VERSION=14 +SUBMINOR_VERSION=15