propagate from branch 'ca.inverse.sogo.1_3_15' (head 2718d596001d2e9358dcce09a959434c8f775f9f)
to branch 'ca.inverse.sogo' (head 366adf06b05b4f972813f3e731ae3338140ba86e) Monotone-Parent: 2718d596001d2e9358dcce09a959434c8f775f9f Monotone-Parent: 366adf06b05b4f972813f3e731ae3338140ba86e Monotone-Revision: ba40327d7cdcc284485580a61af95f9056989d40 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-04-05T18:50:43 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
commit
fcbc47b234
73
ChangeLog
73
ChangeLog
|
@ -21,6 +21,43 @@
|
|||
* OGoContentStore/OCSContactFieldExtractor.m
|
||||
(-extractQuickFieldsFromVCard): idem.
|
||||
|
||||
2012-03-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreCalendarMessage.m (-save): remove comment if
|
||||
content is "\n".
|
||||
|
||||
* OpenChange/MAPIStoreTasksMessage.m (-save): do not reset fields
|
||||
that have not been passed in the properties array, since only
|
||||
RopDeleteProperties should remove them.
|
||||
Remove comment if content is "\n".
|
||||
|
||||
* OpenChange/MAPIStoreObject.m (-addPropertiesFromRow:): dates are
|
||||
now all converted to the user's timezone, even though it just
|
||||
inverts the problem we currently have.
|
||||
|
||||
* OpenChange/MAPIApplication.m (-init): utcTZ is now initialized
|
||||
here.
|
||||
|
||||
* OpenChange/MAPIStoreTypes.[hm]: new host module for utcTZ.
|
||||
|
||||
* OpenChange/MAPIStoreUserContext.m (-timeZone): new method that
|
||||
returns the timezone of an owner user.
|
||||
|
||||
* OpenChange/MAPIStoreObject.m (-ownerTimeZone): removed method,
|
||||
replaced with the one above.
|
||||
|
||||
2012-03-29 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/UIxPreferences.js (savePreferences): fixed
|
||||
validation of end date of vacation of message when not using ISO
|
||||
format (currently limited to French).
|
||||
|
||||
* UI/WebServerResources/ContactsUI.js (startDragging): create an
|
||||
overlapping safety block (div) to avoid possible selection of the
|
||||
underlying text.
|
||||
|
||||
* UI/WebServerResources/MailerUI.js (startDragging): idem.
|
||||
|
||||
2012-03-29 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/UIxPreferences.js (savePreferences): fixed
|
||||
|
@ -44,6 +81,42 @@
|
|||
* SoObjects/SOGo/LDAPSource.m (-allEntryIDs): take the _filter
|
||||
ivar into account.
|
||||
|
||||
2012-03-28 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/SOGoMAPIFSMessage.m
|
||||
(_readFileChangesDataWithDate:andInode:): use the inode number
|
||||
rather than the filesize as change indicator since a new file is
|
||||
created each time the dictionary is written to disk, thanks to the
|
||||
"atomically" flag.
|
||||
(-save): write the file atomically.
|
||||
|
||||
* SoObjects/Contacts/SOGoFolder+CardDAV.m (_isValidFilter:):
|
||||
accept "email" as filter name.
|
||||
(_appendObject:withBaseURL:toREPORTResponse:): fixed the ordering
|
||||
of XML elements as the address*-data props where put outside of
|
||||
the <D:prop> tree.
|
||||
|
||||
* SoObjects/SOGo/LDAPSource.m (-allEntryIDs): take the _filter
|
||||
ivar into account.
|
||||
|
||||
2012-03-27 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Contacts/SOGoContactFolders.m
|
||||
(-lookupName:inContext:acquire:): overriden method that enables
|
||||
the lookup of hidden public sources with iOS devices.
|
||||
|
||||
* SoObjects/Contacts/SOGoContactLDIFEntry.m (-davAddressData): new
|
||||
getter similar to davCalendarData.
|
||||
|
||||
* SoObjects/Contacts/SOGoContactSourceFolder.m
|
||||
(-davAddressbookMultiget): new REPORT handler based on
|
||||
-[SOGoAppointmentFolder davCalendarMultiget].
|
||||
|
||||
* SoObjects/Contacts/SOGoUserFolder+Contacts.m
|
||||
(-davDirectoryGateway): new getter that returns the url to the
|
||||
first available directory source.
|
||||
(-davResourceType): declare resource as "directory" (carddav).
|
||||
|
||||
2012-03-27 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Contacts/SOGoContactFolders.m
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
*/
|
||||
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
#import <Foundation/NSTimeZone.h>
|
||||
|
||||
#import <SOGo/SOGoProductLoader.h>
|
||||
#import <SOGo/SOGoSystemDefaults.h>
|
||||
|
@ -28,6 +29,7 @@
|
|||
#import <Appointments/iCalEntityObject+SOGo.h>
|
||||
|
||||
#import "MAPIStoreUserContext.h"
|
||||
#import "MAPIStoreTypes.h"
|
||||
|
||||
#import "MAPIApplication.h"
|
||||
|
||||
|
@ -49,6 +51,9 @@ MAPIApplication *MAPIApp = nil;
|
|||
|
||||
MAPIApp = [super init];
|
||||
[MAPIApp retain];
|
||||
|
||||
utcTZ = [NSTimeZone timeZoneWithName: @"UTC"];
|
||||
[utcTZ retain];
|
||||
}
|
||||
|
||||
return MAPIApp;
|
||||
|
|
|
@ -35,8 +35,6 @@
|
|||
|
||||
@class SOGoUser;
|
||||
|
||||
extern NSTimeZone *utcTZ;
|
||||
|
||||
@interface MAPIStoreAppointmentWrapper : NSObject
|
||||
{
|
||||
struct mapistore_connection_info *connInfo;
|
||||
|
|
|
@ -59,16 +59,12 @@
|
|||
#include <mapistore/mapistore_errors.h>
|
||||
#include <mapistore/mapistore_nameid.h>
|
||||
|
||||
NSTimeZone *utcTZ;
|
||||
|
||||
static NSCharacterSet *hexCharacterSet = nil;
|
||||
|
||||
@implementation MAPIStoreAppointmentWrapper
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
utcTZ = [NSTimeZone timeZoneWithName: @"UTC"];
|
||||
[utcTZ retain];
|
||||
if (!hexCharacterSet)
|
||||
{
|
||||
hexCharacterSet = [NSCharacterSet characterSetWithCharactersInString: @"1234567890abcdefABCDEF"];
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
[MAPIStoreAppointmentWrapper wrapperWithICalEvent: event
|
||||
andUser: [userContext sogoUser]
|
||||
andSenderEmail: nil
|
||||
inTimeZone: [self ownerTimeZone]
|
||||
inTimeZone: [userContext timeZone]
|
||||
withConnectionInfo: [context connectionInfo]]);
|
||||
}
|
||||
|
||||
|
@ -766,10 +766,12 @@
|
|||
isAllDay = [value boolValue];
|
||||
if (!isAllDay)
|
||||
{
|
||||
tzName = [[self ownerTimeZone] name];
|
||||
tzName = [[[self userContext] timeZone] name];
|
||||
tz = [iCalTimeZone timeZoneForName: tzName];
|
||||
[vCalendar addTimeZone: tz];
|
||||
}
|
||||
else
|
||||
tz = nil;
|
||||
|
||||
// start
|
||||
value = [properties objectForKey: MAPIPropertyKey (PR_START_DATE)];
|
||||
|
@ -779,18 +781,18 @@
|
|||
if (value)
|
||||
{
|
||||
start = (iCalDateTime *) [newEvent uniqueChildWithTag: @"dtstart"];
|
||||
[start setTimeZone: tz];
|
||||
if (isAllDay)
|
||||
{
|
||||
[start setDate: value];
|
||||
[start setTimeZone: nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
tzOffset = [[value timeZone] secondsFromGMTForDate: value];
|
||||
value = [value dateByAddingYears: 0 months: 0 days: 0
|
||||
hours: 0 minutes: 0
|
||||
seconds: -tzOffset];
|
||||
[start setTimeZone: nil];
|
||||
[start setDate: value];
|
||||
}
|
||||
else
|
||||
{
|
||||
[start setTimeZone: tz];
|
||||
seconds: tzOffset];
|
||||
[start setDateTime: value];
|
||||
}
|
||||
}
|
||||
|
@ -802,18 +804,18 @@
|
|||
if (value)
|
||||
{
|
||||
end = (iCalDateTime *) [newEvent uniqueChildWithTag: @"dtend"];
|
||||
[end setTimeZone: tz];
|
||||
if (isAllDay)
|
||||
{
|
||||
[end setDate: value];
|
||||
[end setTimeZone: nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
tzOffset = [[value timeZone] secondsFromGMTForDate: value];
|
||||
value = [value dateByAddingYears: 0 months: 0 days: 0
|
||||
hours: 0 minutes: 0
|
||||
seconds: -tzOffset];
|
||||
[end setTimeZone: nil];
|
||||
[end setDate: value];
|
||||
}
|
||||
else
|
||||
{
|
||||
[end setTimeZone: tz];
|
||||
seconds: tzOffset];
|
||||
[end setDateTime: value];
|
||||
}
|
||||
}
|
||||
|
@ -872,10 +874,13 @@
|
|||
value = [value htmlToText];
|
||||
}
|
||||
}
|
||||
if (value && [value length] == 0)
|
||||
value = nil;
|
||||
[newEvent setComment: value];
|
||||
|
||||
if (value)
|
||||
{
|
||||
if ([value length] == 0 || [value isEqualToString: @"\\n"])
|
||||
value = nil;
|
||||
[newEvent setComment: value];
|
||||
}
|
||||
|
||||
/* recurrence */
|
||||
value = [properties
|
||||
objectForKey: MAPIPropertyKey (PidLidAppointmentRecur)];
|
||||
|
|
|
@ -35,8 +35,6 @@
|
|||
|
||||
#include <mapistore/mapistore_errors.h>
|
||||
|
||||
extern NSTimeZone *utcTZ;
|
||||
|
||||
/* TODO: handle URL pictures via PidTagAttachMethod = ref ? */
|
||||
|
||||
@implementation MAPIStoreContactsAttachment
|
||||
|
|
|
@ -55,8 +55,8 @@
|
|||
{
|
||||
struct mapistore_connection_info *connInfo;
|
||||
NSMutableArray *containersBag;
|
||||
SOGoUser *activeUser;
|
||||
MAPIStoreUserContext *userContext;
|
||||
SOGoUser *activeUser; /* the user accessing the resource */
|
||||
MAPIStoreUserContext *userContext; /* the owner or the resource */
|
||||
NSURL *contextUrl;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#import "MAPIStoreFAIMessage.h"
|
||||
|
||||
#undef DEBUG
|
||||
#include <stdbool.h>
|
||||
#include <talloc.h>
|
||||
#include <util/time.h>
|
||||
#include <mapistore/mapistore.h>
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#import "MAPIStoreFallbackContext.h"
|
||||
|
||||
#undef DEBUG
|
||||
#include <inttypes.h>
|
||||
#include <mapistore/mapistore.h>
|
||||
|
||||
@implementation MAPIStoreFallbackContext
|
||||
|
|
|
@ -284,7 +284,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
|||
wrapperWithICalEvent: event
|
||||
andUser: [context activeUser]
|
||||
andSenderEmail: senderEmail
|
||||
inTimeZone: [self ownerTimeZone]
|
||||
inTimeZone: [[self userContext] timeZone]
|
||||
withConnectionInfo: [context connectionInfo]];
|
||||
[appointmentWrapper retain];
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#import <Foundation/NSData.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSTimeZone.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
#import <NGExtensions/NGHashMap.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
|
@ -495,7 +496,11 @@ FillMessageHeadersFromProperties (NGMutableHashMap *headers,
|
|||
|
||||
date = [mailProperties objectForKey: MAPIPropertyKey (PR_CLIENT_SUBMIT_TIME)];
|
||||
if (date)
|
||||
[headers addObject: [date rfc822DateString] forKey: @"date"];
|
||||
{
|
||||
date = [date addYear: 0 month: 0 day: 0
|
||||
hour: 0 minute: 0 second: [[date timeZone] secondsFromGMT]];
|
||||
[headers addObject: [date rfc822DateString] forKey: @"date"];
|
||||
}
|
||||
[headers addObject: @"1.0" forKey: @"MIME-Version"];
|
||||
}
|
||||
|
||||
|
|
|
@ -77,8 +77,6 @@
|
|||
- (uint64_t) objectId;
|
||||
- (NSString *) url;
|
||||
|
||||
- (NSTimeZone *) ownerTimeZone;
|
||||
|
||||
/* properties */
|
||||
|
||||
- (BOOL) canGetProperty: (enum MAPITAGS) propTag;
|
||||
|
|
|
@ -20,7 +20,9 @@
|
|||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSCalendarDate.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSTimeZone.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
#import <SOGo/SOGoObject.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
|
@ -210,21 +212,6 @@ static Class NSExceptionK, MAPIStoreFolderK;
|
|||
containerURL, [self nameInContainer]];
|
||||
}
|
||||
|
||||
- (NSTimeZone *) ownerTimeZone
|
||||
{
|
||||
NSString *owner;
|
||||
SOGoUserDefaults *ud;
|
||||
NSTimeZone *tz;
|
||||
WOContext *woContext;
|
||||
|
||||
woContext = [[self userContext] woContext];
|
||||
owner = [sogoObject ownerInContext: woContext];
|
||||
ud = [[SOGoUser userWithLogin: owner] userDefaults];
|
||||
tz = [ud timeZone];
|
||||
|
||||
return tz;
|
||||
}
|
||||
|
||||
- (void) addProperties: (NSDictionary *) newNewProperties
|
||||
{
|
||||
[properties addEntriesFromDictionary: newNewProperties];
|
||||
|
@ -447,16 +434,37 @@ static Class NSExceptionK, MAPIStoreFolderK;
|
|||
struct SPropValue *cValue;
|
||||
NSUInteger counter;
|
||||
NSMutableDictionary *newProperties;
|
||||
NSTimeZone *tz;
|
||||
NSInteger tzOffset;
|
||||
id value;
|
||||
|
||||
tz = nil;
|
||||
|
||||
newProperties = [NSMutableDictionary dictionaryWithCapacity: aRow->cValues];
|
||||
for (counter = 0; counter < aRow->cValues; counter++)
|
||||
{
|
||||
cValue = aRow->lpProps + counter;
|
||||
if ((cValue->ulPropTag & 0xfff) == PT_STRING8)
|
||||
[self warnWithFormat:
|
||||
@"attempting to set string property as PR_STRING8: %.8x",
|
||||
cValue->ulPropTag];
|
||||
[newProperties setObject: NSObjectFromSPropValue (cValue)
|
||||
value = NSObjectFromSPropValue (cValue);
|
||||
switch (cValue->ulPropTag & 0xffff)
|
||||
{
|
||||
case PT_STRING8:
|
||||
case PT_MV_STRING8:
|
||||
[self warnWithFormat:
|
||||
@"attempting to set string property as PR_STRING8: %.8x",
|
||||
cValue->ulPropTag];
|
||||
break;
|
||||
case PT_SYSTIME:
|
||||
if (!tz)
|
||||
{
|
||||
tz = [[self userContext] timeZone];
|
||||
tzOffset = -[tz secondsFromGMT];
|
||||
}
|
||||
value = [value addYear: 0 month: 0 day: 0
|
||||
hour: 0 minute: 0 second: tzOffset];
|
||||
[value setTimeZone: tz];
|
||||
break;
|
||||
}
|
||||
[newProperties setObject: value
|
||||
forKey: MAPIPropertyKey (cValue->ulPropTag)];
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
*/
|
||||
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#import <NGExtensions/NSCalendarDate+misc.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
|
@ -32,6 +33,7 @@
|
|||
#import "NSDate+MAPIStore.h"
|
||||
#import "MAPIStoreRecurrenceUtils.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <talloc.h>
|
||||
#include <util/time.h>
|
||||
#include <gen_ndr/property.h>
|
||||
|
|
|
@ -329,7 +329,8 @@
|
|||
iCalToDo *vToDo;
|
||||
id value;
|
||||
iCalDateTime *date;
|
||||
NSString *status, *priority;
|
||||
iCalTimeZone *tz;
|
||||
NSString *status, *priority, *tzName;
|
||||
NSCalendarDate *now;
|
||||
NSInteger tzOffset;
|
||||
double doubleValue;
|
||||
|
@ -338,6 +339,10 @@
|
|||
vCalendar = [vToDo parent];
|
||||
[vCalendar setProdID: @"-//Inverse inc.//OpenChange+SOGo//EN"];
|
||||
|
||||
tzName = [[[self userContext] timeZone] name];
|
||||
tz = [iCalTimeZone timeZoneForName: tzName];
|
||||
[vCalendar addTimeZone: tz];
|
||||
|
||||
// summary
|
||||
value = [properties
|
||||
objectForKey: MAPIPropertyKey (PR_NORMALIZED_SUBJECT_UNICODE)];
|
||||
|
@ -358,12 +363,12 @@
|
|||
value = [value htmlToText];
|
||||
}
|
||||
}
|
||||
if (value && [value length] == 0)
|
||||
value = nil;
|
||||
[vToDo setComment: value];
|
||||
|
||||
if (value)
|
||||
[vToDo setComment: value];
|
||||
{
|
||||
if ([value length] == 0 || [value isEqualToString: @"\\n"])
|
||||
value = nil;
|
||||
[vToDo setComment: value];
|
||||
}
|
||||
|
||||
// location
|
||||
value = [properties objectForKey: MAPIPropertyKey (PidLidLocation)];
|
||||
|
@ -388,31 +393,17 @@
|
|||
if (value)
|
||||
{
|
||||
date = (iCalDateTime *) [vToDo uniqueChildWithTag: @"dtstart"];
|
||||
tzOffset = [[value timeZone] secondsFromGMTForDate: value];
|
||||
value = [value dateByAddingYears: 0 months: 0 days: 0
|
||||
hours: 0 minutes: 0
|
||||
seconds: -tzOffset];
|
||||
[date setDate: value];
|
||||
[date setTimeZone: tz];
|
||||
[date setDateTime: value];
|
||||
}
|
||||
else
|
||||
{
|
||||
[vToDo setStartDate: nil];
|
||||
}
|
||||
|
||||
|
||||
// due
|
||||
value = [properties objectForKey: MAPIPropertyKey (PidLidTaskDueDate)];
|
||||
if (value)
|
||||
{
|
||||
date = (iCalDateTime *) [vToDo uniqueChildWithTag: @"due"];
|
||||
tzOffset = [[value timeZone] secondsFromGMTForDate: value];
|
||||
value = [value dateByAddingYears: 0 months: 0 days: 0
|
||||
hours: 0 minutes: 0
|
||||
seconds: -tzOffset];
|
||||
[date setDate: value];
|
||||
}
|
||||
else
|
||||
{
|
||||
[vToDo setDue: nil];
|
||||
[date setTimeZone: tz];
|
||||
[date setDateTime: value];
|
||||
}
|
||||
|
||||
// completed
|
||||
|
@ -426,10 +417,6 @@
|
|||
seconds: -tzOffset];
|
||||
[date setDate: value];
|
||||
}
|
||||
else
|
||||
{
|
||||
[vToDo setCompleted: nil];
|
||||
}
|
||||
|
||||
// status
|
||||
value = [properties objectForKey: MAPIPropertyKey (PidLidTaskStatus)];
|
||||
|
@ -459,10 +446,8 @@
|
|||
default: // IMPORTANCE_NORMAL
|
||||
priority = @"5";
|
||||
}
|
||||
[vToDo setPriority: priority];
|
||||
}
|
||||
else
|
||||
priority = @"0"; // None
|
||||
[vToDo setPriority: priority];
|
||||
|
||||
// percent complete
|
||||
// NOTE: this does not seem to work on Outlook 2003. PidLidPercentComplete's value
|
||||
|
|
|
@ -32,6 +32,9 @@
|
|||
|
||||
@class NSData;
|
||||
@class NSDictionary;
|
||||
@class NSTimeZone;
|
||||
|
||||
extern NSTimeZone *utcTZ;
|
||||
|
||||
uint8_t *MAPIBoolValue (void *memCtx, BOOL value);
|
||||
uint32_t *MAPILongValue (void *memCtx, uint32_t value);
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
#include <mapistore/mapistore.h>
|
||||
#include <mapistore/mapistore_errors.h>
|
||||
|
||||
NSTimeZone *utcTZ;
|
||||
|
||||
uint8_t *
|
||||
MAPIBoolValue (void *memCtx, BOOL value)
|
||||
{
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
@class NSMutableDictionary;
|
||||
@class NSString;
|
||||
@class NSTimeZone;
|
||||
|
||||
@class WOContext;
|
||||
|
||||
|
@ -43,6 +44,7 @@
|
|||
{
|
||||
NSString *username;
|
||||
SOGoUser *sogoUser;
|
||||
NSTimeZone *timeZone;
|
||||
|
||||
SOGoUserFolder *userFolder;
|
||||
NSMutableArray *containersBag;
|
||||
|
@ -63,6 +65,8 @@
|
|||
- (NSString *) username;
|
||||
- (SOGoUser *) sogoUser;
|
||||
|
||||
- (NSTimeZone *) timeZone;
|
||||
|
||||
- (SOGoUserFolder *) userFolder;
|
||||
|
||||
- (NSDictionary *) rootFolders;
|
||||
|
|
|
@ -137,6 +137,20 @@ static NSMapTable *contextsTable = nil;
|
|||
return sogoUser;
|
||||
}
|
||||
|
||||
- (NSTimeZone *) timeZone
|
||||
{
|
||||
if (!timeZone)
|
||||
{
|
||||
SOGoUser *user;
|
||||
|
||||
user = [self sogoUser];
|
||||
timeZone = [[user userDefaults] timeZone];
|
||||
[timeZone retain];
|
||||
}
|
||||
|
||||
return timeZone;
|
||||
}
|
||||
|
||||
- (SOGoUserFolder *) userFolder
|
||||
{
|
||||
if (!userFolder)
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#import "NSArray+MAPIStore.h"
|
||||
|
||||
#undef DEBUG
|
||||
#include <stdbool.h>
|
||||
#include <talloc.h>
|
||||
#include <util/time.h>
|
||||
#include <gen_ndr/exchange.h>
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#import "NSDate+MAPIStore.h"
|
||||
|
||||
#undef DEBUG
|
||||
#include <stdbool.h>
|
||||
#include <talloc.h>
|
||||
#include <util/time.h>
|
||||
#include <mapistore/mapistore.h>
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#import "SOGoMAPIFSFolder.h"
|
||||
|
||||
#undef DEBUG
|
||||
#include <stdbool.h>
|
||||
#include <talloc.h>
|
||||
#include <util/time.h>
|
||||
#include <mapistore/mapistore.h>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
@interface SOGoMAPIFSMessage : SOGoMAPIVolatileMessage
|
||||
{
|
||||
NSString *completeFilename;
|
||||
NSUInteger fileSize;
|
||||
NSUInteger inode;
|
||||
NSData *lastModificationTime;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
if ((self = [super init]))
|
||||
{
|
||||
completeFilename = nil;
|
||||
fileSize = 0;
|
||||
inode = 0;
|
||||
lastModificationTime = nil;
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@
|
|||
}
|
||||
|
||||
- (BOOL) _readFileChangesDataWithDate: (NSDate **) newLMTime
|
||||
andSize: (NSUInteger *) newFileSize
|
||||
andInode: (NSUInteger *) newInode
|
||||
{
|
||||
BOOL rc;
|
||||
NSDictionary *attributes;
|
||||
|
@ -97,7 +97,7 @@
|
|||
if (attributes)
|
||||
{
|
||||
*newLMTime = [attributes fileModificationDate];
|
||||
*newFileSize = [attributes fileSize];
|
||||
*newInode = [attributes fileSystemFileNumber];
|
||||
rc = YES;
|
||||
}
|
||||
else
|
||||
|
@ -107,22 +107,22 @@
|
|||
}
|
||||
|
||||
- (BOOL) _checkFileChangesDataWithDate: (NSDate **) newLMTime
|
||||
andSize: (NSUInteger *) newFileSize
|
||||
andInode: (NSUInteger *) newInode
|
||||
{
|
||||
BOOL hasChanged = NO;
|
||||
NSDate *lastLMTime;
|
||||
NSUInteger lastFileSize;
|
||||
NSUInteger lastInode;
|
||||
|
||||
if ([self _readFileChangesDataWithDate: &lastLMTime
|
||||
andSize: &lastFileSize])
|
||||
andInode: &lastInode])
|
||||
{
|
||||
if (fileSize != lastFileSize
|
||||
if (inode != lastInode
|
||||
|| ![lastModificationTime isEqual: lastLMTime])
|
||||
{
|
||||
if (lastLMTime)
|
||||
*newLMTime = lastLMTime;
|
||||
if (newFileSize)
|
||||
*newFileSize = lastFileSize;
|
||||
if (newInode)
|
||||
*newInode = lastInode;
|
||||
hasChanged = YES;
|
||||
}
|
||||
}
|
||||
|
@ -136,10 +136,10 @@
|
|||
NSString *error;
|
||||
NSPropertyListFormat format;
|
||||
NSDate *lastLMTime;
|
||||
NSUInteger lastFileSize;
|
||||
NSUInteger lastInode;
|
||||
|
||||
if ([self _checkFileChangesDataWithDate: &lastLMTime
|
||||
andSize: &lastFileSize])
|
||||
andInode: &lastInode])
|
||||
{
|
||||
[self logWithFormat: @"file '%@' new or modified: rereading properties",
|
||||
[self completeFilename]];
|
||||
|
@ -158,7 +158,7 @@
|
|||
@" of message: '%@'", error];
|
||||
}
|
||||
ASSIGN (lastModificationTime, lastLMTime);
|
||||
fileSize = lastFileSize;
|
||||
inode = lastInode;
|
||||
}
|
||||
|
||||
return [super properties];
|
||||
|
@ -168,7 +168,7 @@
|
|||
{
|
||||
NSData *content;
|
||||
NSDate *lastLMTime;
|
||||
NSUInteger lastFileSize;
|
||||
NSUInteger lastInode;
|
||||
|
||||
[container ensureDirectory];
|
||||
|
||||
|
@ -178,14 +178,13 @@
|
|||
dataFromPropertyList: [self properties]
|
||||
format: NSPropertyListBinaryFormat_v1_0
|
||||
errorDescription: NULL];
|
||||
if (![content writeToFile: [self completeFilename] atomically: NO])
|
||||
if (![content writeToFile: [self completeFilename] atomically: YES])
|
||||
[NSException raise: @"MAPIStoreIOException"
|
||||
format: @"could not save message"];
|
||||
|
||||
[self _readFileChangesDataWithDate: &lastLMTime
|
||||
andSize: &lastFileSize];
|
||||
[self _readFileChangesDataWithDate: &lastLMTime andInode: &lastInode];
|
||||
ASSIGN (lastModificationTime, lastLMTime);
|
||||
fileSize = lastFileSize;
|
||||
inode = lastInode;
|
||||
// [self logWithFormat: @"fs message written to '%@'", [self completeFilename]];
|
||||
}
|
||||
|
||||
|
|
6
Version
6
Version
|
@ -2,6 +2,6 @@
|
|||
# This file is included by library makefiles to set the version information
|
||||
# of the executable.
|
||||
|
||||
MAJOR_VERSION=1
|
||||
MINOR_VERSION=3
|
||||
SUBMINOR_VERSION=15
|
||||
MAJOR_VERSION=2
|
||||
MINOR_VERSION=0
|
||||
SUBMINOR_VERSION=0
|
||||
|
|
11
debian/control
vendored
11
debian/control
vendored
|
@ -22,6 +22,17 @@ Description: a modern and scalable groupware
|
|||
UI for the users, consistency in look and feel with the Mozilla applications,
|
||||
and to reduce the load of the transactions on the server.
|
||||
|
||||
Package: sogo-dev
|
||||
Section: devel
|
||||
Architecture: any
|
||||
Depends: sogo (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
|
||||
Replaces: sogo (<< ${binary:Version})
|
||||
Description: a modern and scalable groupware - development files
|
||||
SOGo is a groupware server built around OpenGroupware.org (OGo) and
|
||||
the SOPE application server with focus on scalability.
|
||||
.
|
||||
This package contains the development files for developing SOGo modules.
|
||||
|
||||
Package: sogo-dbg
|
||||
Section: debug
|
||||
Priority: extra
|
||||
|
|
57
debian/control-squeeze
vendored
Normal file
57
debian/control-squeeze
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
Source: sogo
|
||||
Priority: optional
|
||||
Maintainer: Inverse Support <support@inverse.ca>
|
||||
Build-Depends: debhelper (>= 7.0.15), gobjc | objc-compiler, libgnustep-base-dev, libsope-appserver4.9-dev, libsope-core4.9-dev, libsope-gdl1-4.9-dev, libsope-ldap4.9-dev, libsope-mime4.9-dev, libsope-xml4.9-dev, libmemcached-dev, libxml2-dev, libsbjson-dev, libssl-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev, libmapi-dev, libmapistore-dev, libmapiproxy-dev
|
||||
Section: web
|
||||
Standards-Version: 3.9.1
|
||||
|
||||
Package: sogo
|
||||
Section: web
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, tmpreaper, sope4.9-libxmlsaxdriver, sope4.9-db-connector, gnustep-make, libcurl3
|
||||
Suggests: nginx
|
||||
Description: a modern and scalable groupware
|
||||
SOGo is a groupware server built around OpenGroupware.org (OGo) and
|
||||
the SOPE application server with focus on scalability.
|
||||
The Inverse edition of this project has many feature enhancements:
|
||||
* CalDAV and GroupDAV compliance
|
||||
* full handling of vCard as well as vCalendar/iCalendar formats
|
||||
* support for folder sharing and ACLs
|
||||
.
|
||||
The Web interface has been rewritten in an AJAX fashion to provide a faster
|
||||
UI for the users, consistency in look and feel with the Mozilla applications,
|
||||
and to reduce the load of the transactions on the server.
|
||||
|
||||
Package: sogo-dev
|
||||
Section: devel
|
||||
Architecture: any
|
||||
Depends: sogo (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
|
||||
Replaces: sogo (<< ${binary:Version})
|
||||
Description: a modern and scalable groupware - development files
|
||||
SOGo is a groupware server built around OpenGroupware.org (OGo) and
|
||||
the SOPE application server with focus on scalability.
|
||||
.
|
||||
This package contains the development files for developing SOGo modules.
|
||||
|
||||
Package: sogo-openchange
|
||||
Section: net
|
||||
Priority: extra
|
||||
Architecture: any
|
||||
Depends: sogo (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: a modern and scalable groupware - OpenChange backend
|
||||
SOGo is a groupware server built around OpenGroupware.org (OGo) and
|
||||
the SOPE application server with focus on scalability.
|
||||
.
|
||||
This package contains the backend plugin for using SOGo as a backend
|
||||
to OpenChange.
|
||||
|
||||
Package: sogo-dbg
|
||||
Section: debug
|
||||
Priority: extra
|
||||
Architecture: any
|
||||
Depends: sogo (= ${binary:Version}), ${misc:Depends}
|
||||
Description: a modern and scalable groupware - debugging symbols
|
||||
SOGo is a groupware server built around OpenGroupware.org (OGo) and
|
||||
the SOPE application server with focus on scalability.
|
||||
.
|
||||
This package contains the debugging symbols for SOGo.
|
43
debian/rules
vendored
43
debian/rules
vendored
|
@ -3,6 +3,8 @@
|
|||
export DH_VERBOSE=1
|
||||
# export DH_OPTIONS="-p sogo"
|
||||
|
||||
DESTDIR=$(CURDIR)/debian/tmp
|
||||
|
||||
config.make: configure
|
||||
dh_testdir
|
||||
./configure
|
||||
|
@ -14,36 +16,59 @@ build-arch: build-arch-stamp
|
|||
build-arch-stamp: config.make
|
||||
# Add here commands to compile the arch part of the package.
|
||||
$(MAKE)
|
||||
if pkg-config --atleast-version=1.0 libmapi; \
|
||||
then (cd OpenChange; $(MAKE)); \
|
||||
fi
|
||||
touch $@
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-arch-stamp
|
||||
if [ -f config.make ]; then make clean; fi
|
||||
if [ -f config.make ]; \
|
||||
then \
|
||||
if pkg-config --atleast-version=1.0 libmapi; \
|
||||
then \
|
||||
(cd OpenChange; make clean); \
|
||||
fi; \
|
||||
make clean; \
|
||||
fi
|
||||
dh_clean
|
||||
|
||||
install: install-arch
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_prep -i
|
||||
dh_installdirs -i
|
||||
dh_install -i
|
||||
# dh_prep -i
|
||||
# dh_installdirs -i
|
||||
# dh_install -i
|
||||
|
||||
install-arch: build-arch
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_prep -i
|
||||
dh_prep
|
||||
# dh_installdirs -s
|
||||
|
||||
$(MAKE) DESTDIR=$(CURDIR)/debian/tmp GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install
|
||||
$(MAKE) DESTDIR=$(DESTDIR) GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install
|
||||
if pkg-config --atleast-version=1.0 libmapi; \
|
||||
then \
|
||||
(cd OpenChange; \
|
||||
$(MAKE) \
|
||||
DESTDIR=$(DESTDIR) \
|
||||
GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \
|
||||
install); \
|
||||
rm -f $(DESTDIR)/usr/lib/mapistore_backends/libMAPIStoreSOGo.so.1; \
|
||||
rm -f $(DESTDIR)/usr/lib/mapistore_backends/libMAPIStoreSOGo.so; \
|
||||
mv -f $(DESTDIR)/usr/lib/mapistore_backends/libMAPIStoreSOGo.so.1.0.0 \
|
||||
$(DESTDIR)/usr/lib/mapistore_backends/SOGo.so; \
|
||||
fi
|
||||
|
||||
mkdir -p debian/tmp/etc/default
|
||||
cp Scripts/sogo-default debian/tmp/etc/default/sogo
|
||||
mkdir -p debian/tmp/usr/share/lintian/overrides
|
||||
cp debian/sogo.overrides debian/tmp/usr/share/lintian/overrides/sogo
|
||||
mkdir -p debian/tmp/etc/apache2/conf.d
|
||||
cp Apache/SOGo.conf debian/tmp/etc/apache2/conf.d/SOGo.conf
|
||||
install -D -m 600 Scripts/sogo.cron debian/tmp/etc/cron.d/sogo
|
||||
install -D -m 644 Scripts/sogo.cron debian/tmp/etc/cron.d/sogo
|
||||
|
||||
# Build architecture dependant packages using the common target.
|
||||
binary-arch: build-arch install-arch
|
||||
|
@ -64,8 +89,8 @@ binary-arch: build-arch install-arch
|
|||
( cd debian/sogo-dbg/usr/lib/debug/usr/lib/; \
|
||||
ln -s GNUstep/Frameworks/SOGo.framework/Versions/*/libSOGo* ./ )
|
||||
dh_compress
|
||||
dh_fixperms -X/etc/cron.d/sogo
|
||||
dh_makeshlibs
|
||||
dh_fixperms
|
||||
dh_makeshlibs -X/usr/lib/mapistore_backends
|
||||
dh_shlibdeps
|
||||
dh_installdeb
|
||||
dh_gencontrol
|
||||
|
|
2
debian/sogo-dev.install
vendored
Normal file
2
debian/sogo-dev.install
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
usr/include/GNUstep/*
|
||||
usr/lib/lib*.so
|
2
debian/sogo-openchange.install
vendored
Normal file
2
debian/sogo-openchange.install
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
usr/lib/mapistore_backends/*
|
||||
usr/lib/GNUstep/SOGo/SOGoBackend.MAPIStore
|
13
debian/sogo.install
vendored
13
debian/sogo.install
vendored
|
@ -2,7 +2,14 @@ etc/default/sogo
|
|||
etc/apache2/conf.d/SOGo.conf
|
||||
etc/cron.d/sogo
|
||||
usr/sbin/*
|
||||
usr/lib/GNUstep/*
|
||||
usr/lib/lib*
|
||||
usr/include/GNUstep/*
|
||||
usr/lib/GNUstep/Frameworks/*
|
||||
usr/lib/GNUstep/Libraries/*
|
||||
usr/lib/GNUstep/OCSTypeModels/*
|
||||
usr/lib/GNUstep/SaxDrivers-4.9/*
|
||||
usr/lib/GNUstep/SaxMappings/*
|
||||
usr/lib/GNUstep/WOxElemBuilders-4.9/*
|
||||
usr/lib/GNUstep/SOGo/*.SOGo
|
||||
usr/lib/GNUstep/SOGo/Templates
|
||||
usr/lib/GNUstep/SOGo/WebServerResources
|
||||
usr/lib/lib*.so.*
|
||||
usr/share/lintian/*
|
||||
|
|
Loading…
Reference in a new issue