merge of 'ac24628ddb44dde266a92404e39060e7941fa959'
and 'c284de68225198e750f24bf15d220c2e6a7c20e2' Monotone-Parent: ac24628ddb44dde266a92404e39060e7941fa959 Monotone-Parent: c284de68225198e750f24bf15d220c2e6a7c20e2 Monotone-Revision: 8f58a8aa696d8fbbb82f1cd571800676a04b96af Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2011-01-13T16:21:40 Monotone-Branch: ca.inverse.sogomaint-2.0.2
commit
b6bc06b163
68
ChangeLog
68
ChangeLog
|
@ -1,3 +1,71 @@
|
||||||
|
2011-01-11 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreContactsMessageTable.m
|
||||||
|
Added more properties: home/work URL, nickname
|
||||||
|
and department.
|
||||||
|
|
||||||
|
2011-01-11 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* OpenChange/SOGoTaskObject+MAPIStore.m (-setMAPIProperties):
|
||||||
|
release fullCalendar and safeCalendar to force a rebuild of
|
||||||
|
the root object when next requested.
|
||||||
|
|
||||||
|
* OpenChange/SOGoAppointmentObject+MAPIStore.m (-setMAPIProperties):
|
||||||
|
idem.
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreContext.m
|
||||||
|
(-createMessagePropertiesWithMID:inFID:isAssociated:): added a
|
||||||
|
retain count handling.
|
||||||
|
(-releaseRecordWithFMID:ofTableType:): same as above.
|
||||||
|
(-_saveOrSubmitChangesInMessageWithMID:andFlags:save:): cleanup
|
||||||
|
table caches even for modifications.
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreMessageTable.m
|
||||||
|
(-getChildProperty:forKey:withTag:): fixed PR_ACCESS and
|
||||||
|
PR_ACCESS_LEVEL to avoid displaying the "read-only" status.
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreTable.m (-cleanupCaches): remove lastChild
|
||||||
|
from cache too.
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreTasksMessageTable.m
|
||||||
|
(-getChildProperty:forKey:withTag:): fixed typo affecting
|
||||||
|
PidLidTaskStatus.
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreContext.m (-openMessage:withMID:inFID:):
|
||||||
|
create a message dictionary in the message cache in order to
|
||||||
|
enable modifications.
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreContactsMessageTable.m
|
||||||
|
(-_element:ofType:excluding:inCard:): new version of the previous
|
||||||
|
-_phoneOfType:excluding:inCard: method, which now returns the
|
||||||
|
requested element rather than it's first value and which enables
|
||||||
|
the specification of the tag.
|
||||||
|
(-getChildProperty:forKey:withTag:): added support for
|
||||||
|
PidLidPostalAddressId, PR_POSTAL_ADDRESS_UNICODE,
|
||||||
|
PR_POST_OFFICE_BOX_UNICODE, PR_STREET_ADDRESS_UNICODE,
|
||||||
|
PR_LOCALITY_UNICODE, PR_STATE_OR_PROVINCE_UNICODE,
|
||||||
|
PR_POSTAL_CODE_UNICODE, PR_COUNTRY_UNICODE, PidLidWorkAddress,
|
||||||
|
PidLidWorkAddressPostOfficeBox, PidLidWorkAddressStreet,
|
||||||
|
PidLidWorkAddressCity, PidLidWorkAddressState,
|
||||||
|
PidLidWorkAddressPostalCode and PidLidWorkAddressCountry.
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreContext.m (-openMessage:forKey:inTable:):
|
||||||
|
avoid taking NULL values into account when returning the basic
|
||||||
|
properties.
|
||||||
|
|
||||||
|
* OpenChange/SOGoContactGCSEntry+MAPIStore.m
|
||||||
|
(-setMAPIProperties:): added support for work address and its
|
||||||
|
corresponding addresse label. Preliminary support for
|
||||||
|
"PidLidPostalAddressId" which enables us to set a certain address
|
||||||
|
as preferred.
|
||||||
|
Carefully replace existing handled fields to avoid removing them
|
||||||
|
during modification.
|
||||||
|
|
||||||
|
2011-01-10 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreContext.m (-typeLessTag:): removed method as
|
||||||
|
types are now determined from openchange core.
|
||||||
|
|
||||||
2011-01-07 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2011-01-07 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
* OpenChange/MAPIStoreContext.m (_typeLessTag:): new method
|
* OpenChange/MAPIStoreContext.m (_typeLessTag:): new method
|
||||||
|
|
|
@ -53,45 +53,30 @@
|
||||||
return componentQualifier;
|
return componentQualifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) _phoneOfType: (NSString *) aType
|
- (CardElement *) _element: (NSString *) elementTag
|
||||||
excluding: (NSString *) aTypeToExclude
|
ofType: (NSString *) aType
|
||||||
inCard: (NGVCard *) card
|
excluding: (NSString *) aTypeToExclude
|
||||||
|
inCard: (NGVCard *) card
|
||||||
{
|
{
|
||||||
NSArray *elements;
|
NSArray *elements;
|
||||||
NSArray *phones;
|
CardElement *ce, *found;
|
||||||
NSString *phone;
|
NSUInteger count, max;
|
||||||
|
|
||||||
phones = [card childrenWithTag: @"tel"];
|
found = nil;
|
||||||
|
|
||||||
elements = [phones cardElementsWithAttribute: @"type"
|
elements = [[card childrenWithTag: elementTag]
|
||||||
havingValue: aType];
|
cardElementsWithAttribute: @"type"
|
||||||
|
havingValue: aType];
|
||||||
phone = nil;
|
max = [elements count];
|
||||||
|
for (count = 0; !found && count < max; count++)
|
||||||
if ([elements count] > 0)
|
|
||||||
{
|
{
|
||||||
CardElement *ce;
|
ce = [elements objectAtIndex: count];
|
||||||
int i;
|
if (!aTypeToExclude
|
||||||
|
|| ![ce hasAttribute: @"type" havingValue: aTypeToExclude])
|
||||||
for (i = 0; i < [elements count]; i++)
|
found = ce;
|
||||||
{
|
|
||||||
ce = [elements objectAtIndex: i];
|
|
||||||
phone = [ce value: 0];
|
|
||||||
|
|
||||||
if (!aTypeToExclude)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (![ce hasAttribute: @"type" havingValue: aTypeToExclude])
|
|
||||||
break;
|
|
||||||
|
|
||||||
phone = nil;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!phone)
|
return found;
|
||||||
phone = @"";
|
|
||||||
|
|
||||||
return phone;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (enum MAPISTATUS) getChildProperty: (void **) data
|
- (enum MAPISTATUS) getChildProperty: (void **) data
|
||||||
|
@ -100,6 +85,8 @@
|
||||||
{
|
{
|
||||||
NSString *stringValue;
|
NSString *stringValue;
|
||||||
SOGoContactGCSEntry *child;
|
SOGoContactGCSEntry *child;
|
||||||
|
CardElement *element;
|
||||||
|
uint32_t longValue;
|
||||||
enum MAPISTATUS rc;
|
enum MAPISTATUS rc;
|
||||||
|
|
||||||
rc = MAPI_E_SUCCESS;
|
rc = MAPI_E_SUCCESS;
|
||||||
|
@ -134,10 +121,23 @@
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PR_COMPANY_NAME_UNICODE:
|
case PR_COMPANY_NAME_UNICODE:
|
||||||
child = [self lookupChild: childKey];
|
case PR_DEPARTMENT_NAME_UNICODE:
|
||||||
/* that's buggy but it's for the demo */
|
{
|
||||||
stringValue = [[[child vCard] org] componentsJoinedByString: @", "];
|
NSArray *values;
|
||||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
|
||||||
|
child = [self lookupChild: childKey];
|
||||||
|
values = [[child vCard] org];
|
||||||
|
stringValue = nil;
|
||||||
|
|
||||||
|
if (proptag == PR_COMPANY_NAME_UNICODE && [values count] > 0)
|
||||||
|
stringValue = [values objectAtIndex: 0];
|
||||||
|
else if (proptag == PR_DEPARTMENT_NAME_UNICODE && [values count] > 1)
|
||||||
|
stringValue = [values objectAtIndex: 1];
|
||||||
|
|
||||||
|
if (!stringValue)
|
||||||
|
stringValue = @"";
|
||||||
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PR_SUBJECT_UNICODE:
|
case PR_SUBJECT_UNICODE:
|
||||||
|
@ -160,39 +160,258 @@
|
||||||
|
|
||||||
case PR_OFFICE_TELEPHONE_NUMBER_UNICODE:
|
case PR_OFFICE_TELEPHONE_NUMBER_UNICODE:
|
||||||
child = [self lookupChild: childKey];
|
child = [self lookupChild: childKey];
|
||||||
stringValue = [self _phoneOfType: @"work"
|
element = [self _element: @"phone" ofType: @"work"
|
||||||
excluding: @"fax"
|
excluding: @"fax"
|
||||||
inCard: [child vCard]];
|
inCard: [child vCard]];
|
||||||
|
if (element)
|
||||||
|
stringValue = [element value: 0];
|
||||||
|
else
|
||||||
|
stringValue = @"";
|
||||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
break;
|
break;
|
||||||
case PR_HOME_TELEPHONE_NUMBER_UNICODE:
|
case PR_HOME_TELEPHONE_NUMBER_UNICODE:
|
||||||
child = [self lookupChild: childKey];
|
child = [self lookupChild: childKey];
|
||||||
stringValue = [self _phoneOfType: @"home"
|
element = [self _element: @"phone" ofType: @"home"
|
||||||
excluding: @"fax"
|
excluding: @"fax"
|
||||||
inCard: [child vCard]];
|
inCard: [child vCard]];
|
||||||
|
if (element)
|
||||||
|
stringValue = [element value: 0];
|
||||||
|
else
|
||||||
|
stringValue = @"";
|
||||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
break;
|
break;
|
||||||
case PR_MOBILE_TELEPHONE_NUMBER_UNICODE:
|
case PR_MOBILE_TELEPHONE_NUMBER_UNICODE:
|
||||||
child = [self lookupChild: childKey];
|
child = [self lookupChild: childKey];
|
||||||
stringValue = [self _phoneOfType: @"cell"
|
element = [self _element: @"phone" ofType: @"cell"
|
||||||
excluding: nil
|
excluding: nil
|
||||||
inCard: [child vCard]];
|
inCard: [child vCard]];
|
||||||
|
if (element)
|
||||||
|
stringValue = [element value: 0];
|
||||||
|
else
|
||||||
|
stringValue = @"";
|
||||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
break;
|
break;
|
||||||
case PR_PRIMARY_TELEPHONE_NUMBER_UNICODE:
|
case PR_PRIMARY_TELEPHONE_NUMBER_UNICODE:
|
||||||
child = [self lookupChild: childKey];
|
child = [self lookupChild: childKey];
|
||||||
stringValue = [self _phoneOfType: @"pref"
|
element = [self _element: @"phone" ofType: @"pref"
|
||||||
excluding: nil
|
excluding: nil
|
||||||
inCard: [child vCard]];
|
inCard: [child vCard]];
|
||||||
|
if (element)
|
||||||
|
stringValue = [element value: 0];
|
||||||
|
else
|
||||||
|
stringValue = @"";
|
||||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PR_BUSINESS_HOME_PAGE_UNICODE:
|
||||||
|
case PR_PERSONAL_HOME_PAGE_UNICODE:
|
||||||
|
{
|
||||||
|
NSString *type;
|
||||||
|
|
||||||
|
type = (proptag == PR_BUSINESS_HOME_PAGE_UNICODE ? @"work" : @"home");
|
||||||
|
|
||||||
|
child = [self lookupChild: childKey];
|
||||||
|
|
||||||
|
element = [self _element: @"url" ofType: type
|
||||||
|
excluding: nil
|
||||||
|
inCard: [child vCard]];
|
||||||
|
if (element)
|
||||||
|
stringValue = [element value: 0];
|
||||||
|
else
|
||||||
|
stringValue = @"";
|
||||||
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case PidLidEmail1AddressType:
|
case PidLidEmail1AddressType:
|
||||||
case PidLidEmail2AddressType:
|
case PidLidEmail2AddressType:
|
||||||
case PidLidEmail3AddressType:
|
case PidLidEmail3AddressType:
|
||||||
*data = [@"SMTP" asUnicodeInMemCtx: memCtx];
|
*data = [@"SMTP" asUnicodeInMemCtx: memCtx];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PidLidPostalAddressId:
|
||||||
|
child = [self lookupChild: childKey];
|
||||||
|
element = [self _element: @"adr" ofType: @"pref"
|
||||||
|
excluding: nil
|
||||||
|
inCard: [child vCard]];
|
||||||
|
if ([element hasAttribute: @"type"
|
||||||
|
havingValue: @"home"])
|
||||||
|
longValue = 1;
|
||||||
|
else if ([element hasAttribute: @"type"
|
||||||
|
havingValue: @"work"])
|
||||||
|
longValue = 2;
|
||||||
|
else
|
||||||
|
longValue = 0;
|
||||||
|
*data = MAPILongValue (memCtx, longValue);
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* preferred address */
|
||||||
|
case PR_POSTAL_ADDRESS_UNICODE:
|
||||||
|
child = [self lookupChild: childKey];
|
||||||
|
element = [self _element: @"label" ofType: @"pref"
|
||||||
|
excluding: nil
|
||||||
|
inCard: [child vCard]];
|
||||||
|
if (element)
|
||||||
|
stringValue = [element value: 0];
|
||||||
|
else
|
||||||
|
stringValue = @"";
|
||||||
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
|
break;
|
||||||
|
case PR_POST_OFFICE_BOX_UNICODE:
|
||||||
|
child = [self lookupChild: childKey];
|
||||||
|
element = [self _element: @"adr" ofType: @"pref"
|
||||||
|
excluding: nil
|
||||||
|
inCard: [child vCard]];
|
||||||
|
if (element)
|
||||||
|
stringValue = [element value: 0];
|
||||||
|
else
|
||||||
|
stringValue = @"";
|
||||||
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
|
break;
|
||||||
|
case PR_STREET_ADDRESS_UNICODE:
|
||||||
|
child = [self lookupChild: childKey];
|
||||||
|
element = [self _element: @"adr" ofType: @"pref"
|
||||||
|
excluding: nil
|
||||||
|
inCard: [child vCard]];
|
||||||
|
if (element)
|
||||||
|
stringValue = [element value: 2];
|
||||||
|
else
|
||||||
|
stringValue = @"";
|
||||||
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
|
break;
|
||||||
|
case PR_LOCALITY_UNICODE:
|
||||||
|
child = [self lookupChild: childKey];
|
||||||
|
element = [self _element: @"adr" ofType: @"pref"
|
||||||
|
excluding: nil
|
||||||
|
inCard: [child vCard]];
|
||||||
|
if (element)
|
||||||
|
stringValue = [element value: 3];
|
||||||
|
else
|
||||||
|
stringValue = @"";
|
||||||
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
|
break;
|
||||||
|
case PR_STATE_OR_PROVINCE_UNICODE:
|
||||||
|
child = [self lookupChild: childKey];
|
||||||
|
element = [self _element: @"adr" ofType: @"pref"
|
||||||
|
excluding: nil
|
||||||
|
inCard: [child vCard]];
|
||||||
|
if (element)
|
||||||
|
stringValue = [element value: 4];
|
||||||
|
else
|
||||||
|
stringValue = @"";
|
||||||
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
|
break;
|
||||||
|
case PR_POSTAL_CODE_UNICODE:
|
||||||
|
child = [self lookupChild: childKey];
|
||||||
|
element = [self _element: @"adr" ofType: @"pref"
|
||||||
|
excluding: nil
|
||||||
|
inCard: [child vCard]];
|
||||||
|
if (element)
|
||||||
|
stringValue = [element value: 5];
|
||||||
|
else
|
||||||
|
stringValue = @"";
|
||||||
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
|
break;
|
||||||
|
case PR_COUNTRY_UNICODE:
|
||||||
|
child = [self lookupChild: childKey];
|
||||||
|
element = [self _element: @"adr" ofType: @"pref"
|
||||||
|
excluding: nil
|
||||||
|
inCard: [child vCard]];
|
||||||
|
if (element)
|
||||||
|
stringValue = [element value: 6];
|
||||||
|
else
|
||||||
|
stringValue = @"";
|
||||||
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
|
break;
|
||||||
|
|
||||||
|
// case PidLidAddressCountryCode:
|
||||||
|
|
||||||
|
case PidLidWorkAddress:
|
||||||
|
child = [self lookupChild: childKey];
|
||||||
|
element = [self _element: @"label" ofType: @"work"
|
||||||
|
excluding: nil
|
||||||
|
inCard: [child vCard]];
|
||||||
|
if (element)
|
||||||
|
stringValue = [element value: 0];
|
||||||
|
else
|
||||||
|
stringValue = @"";
|
||||||
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PidLidWorkAddressPostOfficeBox:
|
||||||
|
child = [self lookupChild: childKey];
|
||||||
|
element = [self _element: @"adr" ofType: @"work"
|
||||||
|
excluding: nil
|
||||||
|
inCard: [child vCard]];
|
||||||
|
if (element)
|
||||||
|
stringValue = [element value: 0];
|
||||||
|
else
|
||||||
|
stringValue = @"";
|
||||||
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
|
break;
|
||||||
|
case PidLidWorkAddressStreet:
|
||||||
|
child = [self lookupChild: childKey];
|
||||||
|
element = [self _element: @"adr" ofType: @"work"
|
||||||
|
excluding: nil
|
||||||
|
inCard: [child vCard]];
|
||||||
|
if (element)
|
||||||
|
stringValue = [element value: 2];
|
||||||
|
else
|
||||||
|
stringValue = @"";
|
||||||
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
|
break;
|
||||||
|
case PidLidWorkAddressCity:
|
||||||
|
child = [self lookupChild: childKey];
|
||||||
|
element = [self _element: @"adr" ofType: @"work"
|
||||||
|
excluding: nil
|
||||||
|
inCard: [child vCard]];
|
||||||
|
if (element)
|
||||||
|
stringValue = [element value: 3];
|
||||||
|
else
|
||||||
|
stringValue = @"";
|
||||||
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
|
break;
|
||||||
|
case PidLidWorkAddressState:
|
||||||
|
child = [self lookupChild: childKey];
|
||||||
|
element = [self _element: @"adr" ofType: @"work"
|
||||||
|
excluding: nil
|
||||||
|
inCard: [child vCard]];
|
||||||
|
if (element)
|
||||||
|
stringValue = [element value: 4];
|
||||||
|
else
|
||||||
|
stringValue = @"";
|
||||||
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
|
break;
|
||||||
|
case PidLidWorkAddressPostalCode:
|
||||||
|
child = [self lookupChild: childKey];
|
||||||
|
element = [self _element: @"adr" ofType: @"work"
|
||||||
|
excluding: nil
|
||||||
|
inCard: [child vCard]];
|
||||||
|
if (element)
|
||||||
|
stringValue = [element value: 5];
|
||||||
|
else
|
||||||
|
stringValue = @"";
|
||||||
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
|
break;
|
||||||
|
case PidLidWorkAddressCountry:
|
||||||
|
child = [self lookupChild: childKey];
|
||||||
|
element = [self _element: @"adr" ofType: @"work"
|
||||||
|
excluding: nil
|
||||||
|
inCard: [child vCard]];
|
||||||
|
if (element)
|
||||||
|
stringValue = [element value: 6];
|
||||||
|
else
|
||||||
|
stringValue = @"";
|
||||||
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
|
break;
|
||||||
|
|
||||||
|
// PidTagNickname
|
||||||
|
case PR_NICKNAME_UNICODE:
|
||||||
|
child = [self lookupChild: childKey];
|
||||||
|
stringValue = [[child vCard] nickname];
|
||||||
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
rc = [super getChildProperty: data
|
rc = [super getChildProperty: data
|
||||||
forKey: childKey
|
forKey: childKey
|
||||||
|
|
|
@ -803,11 +803,13 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
||||||
@" returned for proptag %s(0x%.8x)",
|
@" returned for proptag %s(0x%.8x)",
|
||||||
propName, tags[count]];
|
propName, tags[count]];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
set_SPropValue_proptag (properties->lpProps + properties->cValues,
|
{
|
||||||
tags[count],
|
set_SPropValue_proptag (properties->lpProps + properties->cValues,
|
||||||
propValue);
|
tags[count],
|
||||||
properties->cValues++;
|
propValue);
|
||||||
|
properties->cValues++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
msg->properties = properties;
|
msg->properties = properties;
|
||||||
|
@ -821,6 +823,7 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
||||||
{
|
{
|
||||||
NSString *childURL, *childKey, *folderURL;
|
NSString *childURL, *childKey, *folderURL;
|
||||||
MAPIStoreTable *table;
|
MAPIStoreTable *table;
|
||||||
|
BOOL isAssociated;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
childURL = [mapping urlFromID: mid];
|
childURL = [mapping urlFromID: mid];
|
||||||
|
@ -830,9 +833,13 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
||||||
andFolderURLAt: &folderURL];
|
andFolderURLAt: &folderURL];
|
||||||
table = [self _tableForFID: fid andTableType: MAPISTORE_FAI_TABLE];
|
table = [self _tableForFID: fid andTableType: MAPISTORE_FAI_TABLE];
|
||||||
if ([[table cachedChildKeys] containsObject: childKey])
|
if ([[table cachedChildKeys] containsObject: childKey])
|
||||||
rc = [self openMessage: msg forKey: childKey inTable: table];
|
{
|
||||||
|
isAssociated = YES;
|
||||||
|
rc = [self openMessage: msg forKey: childKey inTable: table];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
isAssociated = NO;
|
||||||
table = [self _tableForFID: fid andTableType: MAPISTORE_MESSAGE_TABLE];
|
table = [self _tableForFID: fid andTableType: MAPISTORE_MESSAGE_TABLE];
|
||||||
if ([[table cachedChildKeys] containsObject: childKey])
|
if ([[table cachedChildKeys] containsObject: childKey])
|
||||||
rc = [self openMessage: msg forKey: childKey inTable: table];
|
rc = [self openMessage: msg forKey: childKey inTable: table];
|
||||||
|
@ -843,6 +850,11 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
||||||
else
|
else
|
||||||
rc = MAPISTORE_ERR_NOT_FOUND;
|
rc = MAPISTORE_ERR_NOT_FOUND;
|
||||||
|
|
||||||
|
if (rc == MAPI_E_SUCCESS)
|
||||||
|
[self createMessagePropertiesWithMID: mid
|
||||||
|
inFID: fid
|
||||||
|
isAssociated: isAssociated];
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -850,20 +862,39 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
||||||
inFID: (uint64_t) fid
|
inFID: (uint64_t) fid
|
||||||
isAssociated: (BOOL) isAssociated
|
isAssociated: (BOOL) isAssociated
|
||||||
{
|
{
|
||||||
NSMutableDictionary *newMessage;
|
NSMutableDictionary *messageProperties;
|
||||||
NSNumber *midNbr;
|
NSNumber *midNbr;
|
||||||
|
NSUInteger retainCount;
|
||||||
|
|
||||||
[self logWithFormat: @"METHOD '%s' -- mid: 0x%.16x, fid: 0x%.16x",
|
messageProperties = [messages objectForKey:
|
||||||
__FUNCTION__, mid, fid];
|
[NSNumber numberWithUnsignedLongLong: mid]];
|
||||||
newMessage = [NSMutableDictionary new];
|
if (messageProperties)
|
||||||
[newMessage setObject: [NSNumber numberWithUnsignedLongLong: fid]
|
{
|
||||||
forKey: @"fid"];
|
[self logWithFormat:
|
||||||
midNbr = [NSNumber numberWithUnsignedLongLong: mid];
|
@"METHOD '%s' -- mid: 0x%.16x, fid: 0x%.16x; retainCount++",
|
||||||
[newMessage setObject: midNbr forKey: @"mid"];
|
__FUNCTION__, mid, fid];
|
||||||
[newMessage setObject: [NSNumber numberWithBool: isAssociated]
|
retainCount = [[messageProperties objectForKey: @"mapiRetainCount"]
|
||||||
forKey: @"associated"];
|
unsignedIntValue];
|
||||||
[messages setObject: newMessage forKey: midNbr];
|
[messageProperties
|
||||||
[newMessage release];
|
setObject: [NSNumber numberWithUnsignedInt: retainCount + 1]
|
||||||
|
forKey: @"mapiRetainCount"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self logWithFormat: @"METHOD '%s' -- mid: 0x%.16x, fid: 0x%.16x",
|
||||||
|
__FUNCTION__, mid, fid];
|
||||||
|
messageProperties = [NSMutableDictionary new];
|
||||||
|
[messageProperties setObject: [NSNumber numberWithUnsignedLongLong: fid]
|
||||||
|
forKey: @"fid"];
|
||||||
|
midNbr = [NSNumber numberWithUnsignedLongLong: mid];
|
||||||
|
[messageProperties setObject: midNbr forKey: @"mid"];
|
||||||
|
[messageProperties setObject: [NSNumber numberWithBool: isAssociated]
|
||||||
|
forKey: @"associated"];
|
||||||
|
[messageProperties setObject: [NSNumber numberWithInt: 1]
|
||||||
|
forKey: @"mapiRetainCount"];
|
||||||
|
[messages setObject: messageProperties forKey: midNbr];
|
||||||
|
[messageProperties release];
|
||||||
|
}
|
||||||
|
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -928,42 +959,36 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
||||||
NSMutableDictionary *messageProperties;
|
NSMutableDictionary *messageProperties;
|
||||||
NSString *messageURL;
|
NSString *messageURL;
|
||||||
uint64_t fid;
|
uint64_t fid;
|
||||||
BOOL viewMessage;
|
BOOL associated;
|
||||||
|
|
||||||
viewMessage = NO;
|
|
||||||
messageProperties = [messages objectForKey:
|
messageProperties = [messages objectForKey:
|
||||||
[NSNumber numberWithUnsignedLongLong: mid]];
|
[NSNumber numberWithUnsignedLongLong: mid]];
|
||||||
if (messageProperties)
|
if (messageProperties)
|
||||||
{
|
{
|
||||||
messageURL = [mapping urlFromID: mid];
|
messageURL = [mapping urlFromID: mid];
|
||||||
if ([[messageProperties objectForKey: @"associated"] boolValue])
|
associated = [[messageProperties objectForKey: @"associated"] boolValue];
|
||||||
|
if (messageURL)
|
||||||
{
|
{
|
||||||
if (messageURL)
|
if (associated)
|
||||||
message = [self lookupFAIObject: messageURL];
|
message = [self lookupFAIObject: messageURL];
|
||||||
else
|
else
|
||||||
{
|
message = [self lookupObject: messageURL];
|
||||||
fid = [[messageProperties objectForKey: @"fid"]
|
|
||||||
unsignedLongLongValue];
|
|
||||||
message = [self _createMessageOfClass: [messageProperties objectForKey: MAPIPropertyKey (PR_MESSAGE_CLASS_UNICODE)]
|
|
||||||
associated: YES
|
|
||||||
withMID: mid inFID: fid];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (messageURL)
|
fid = [[messageProperties objectForKey: @"fid"]
|
||||||
message = [self lookupObject: messageURL];
|
unsignedLongLongValue];
|
||||||
else
|
message = [self _createMessageOfClass: [messageProperties objectForKey: MAPIPropertyKey (PR_MESSAGE_CLASS_UNICODE)]
|
||||||
{
|
associated: associated
|
||||||
fid = [[messageProperties objectForKey: @"fid"]
|
withMID: mid inFID: fid];
|
||||||
unsignedLongLongValue];
|
|
||||||
message = [self _createMessageOfClass: [messageProperties objectForKey: MAPIPropertyKey (PR_MESSAGE_CLASS_UNICODE)]
|
|
||||||
associated: NO
|
|
||||||
withMID: mid inFID: fid];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (message)
|
if (message)
|
||||||
{
|
{
|
||||||
|
if (associated)
|
||||||
|
[faiTable cleanupCaches];
|
||||||
|
else
|
||||||
|
[messageTable cleanupCaches];
|
||||||
|
|
||||||
[message setMAPIProperties: messageProperties];
|
[message setMAPIProperties: messageProperties];
|
||||||
if (isSave)
|
if (isSave)
|
||||||
[message MAPISave];
|
[message MAPISave];
|
||||||
|
@ -1002,22 +1027,6 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
||||||
save: NO];
|
save: NO];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (enum MAPITAGS) _typeLessTag: (enum MAPITAGS) tag
|
|
||||||
{
|
|
||||||
if (tag == 0x300b0000)
|
|
||||||
tag = PR_SEARCH_KEY;
|
|
||||||
else if (tag == 0x30070000)
|
|
||||||
tag = PR_CREATION_TIME;
|
|
||||||
else if (tag == 0x30080000)
|
|
||||||
tag = PR_LAST_MODIFICATION_TIME;
|
|
||||||
else if (tag == 0x0e080000)
|
|
||||||
tag = PR_MESSAGE_SIZE;
|
|
||||||
else
|
|
||||||
[self warnWithFormat: @"unknown typeless tag: 0x%.8x", tag];
|
|
||||||
|
|
||||||
return tag;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (int) getProperties: (struct SPropTagArray *) sPropTagArray
|
- (int) getProperties: (struct SPropTagArray *) sPropTagArray
|
||||||
ofTableType: (uint8_t) tableType
|
ofTableType: (uint8_t) tableType
|
||||||
inRow: (struct SRow *) aRow
|
inRow: (struct SRow *) aRow
|
||||||
|
@ -1056,8 +1065,6 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
||||||
for (count = 0; count < sPropTagArray->cValues; count++)
|
for (count = 0; count < sPropTagArray->cValues; count++)
|
||||||
{
|
{
|
||||||
tag = sPropTagArray->aulPropTag[count];
|
tag = sPropTagArray->aulPropTag[count];
|
||||||
if ((tag & 0x0000ffff) == 0)
|
|
||||||
tag = [self _typeLessTag: tag];
|
|
||||||
|
|
||||||
propValue = NULL;
|
propValue = NULL;
|
||||||
propRc = [table getChildProperty: &propValue
|
propRc = [table getChildProperty: &propValue
|
||||||
|
@ -1184,7 +1191,7 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
||||||
[self logWithFormat: @"fmid 0x%.16x found", fmid];
|
[self logWithFormat: @"fmid 0x%.16x found", fmid];
|
||||||
for (counter = 0; counter < aRow->cValues; counter++)
|
for (counter = 0; counter < aRow->cValues; counter++)
|
||||||
{
|
{
|
||||||
cValue = &(aRow->lpProps[counter]);
|
cValue = aRow->lpProps + counter;
|
||||||
[message setObject: NSObjectFromSPropValue (cValue)
|
[message setObject: NSObjectFromSPropValue (cValue)
|
||||||
forKey: MAPIPropertyKey (cValue->ulPropTag)];
|
forKey: MAPIPropertyKey (cValue->ulPropTag)];
|
||||||
}
|
}
|
||||||
|
@ -1422,20 +1429,32 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
||||||
- (int) releaseRecordWithFMID: (uint64_t) fmid
|
- (int) releaseRecordWithFMID: (uint64_t) fmid
|
||||||
ofTableType: (uint8_t) tableType
|
ofTableType: (uint8_t) tableType
|
||||||
{
|
{
|
||||||
int rc;
|
|
||||||
NSNumber *midNbr;
|
NSNumber *midNbr;
|
||||||
|
NSMutableDictionary *messageProperties;
|
||||||
|
NSUInteger retainCount;
|
||||||
|
int rc;
|
||||||
|
|
||||||
switch (tableType)
|
switch (tableType)
|
||||||
{
|
{
|
||||||
case MAPISTORE_MESSAGE_TABLE:
|
case MAPISTORE_MESSAGE_TABLE:
|
||||||
rc = MAPISTORE_SUCCESS;
|
rc = MAPISTORE_SUCCESS;
|
||||||
midNbr = [NSNumber numberWithUnsignedLongLong: fmid];
|
midNbr = [NSNumber numberWithUnsignedLongLong: fmid];
|
||||||
if ([messages objectForKey: midNbr])
|
messageProperties = [messages objectForKey: midNbr];
|
||||||
|
if (messageProperties)
|
||||||
{
|
{
|
||||||
[self logWithFormat: @"message with mid %.16x successfully removed"
|
retainCount = [[messageProperties objectForKey: @"mapiRetainCount"]
|
||||||
@" from message cache",
|
unsignedIntValue];
|
||||||
fmid];
|
if (retainCount == 1)
|
||||||
[messages removeObjectForKey: midNbr];
|
{
|
||||||
|
[self logWithFormat: @"message with mid %.16x successfully removed"
|
||||||
|
@" from message cache",
|
||||||
|
fmid];
|
||||||
|
[messages removeObjectForKey: midNbr];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
[messageProperties
|
||||||
|
setObject: [NSNumber numberWithUnsignedInt: retainCount - 1]
|
||||||
|
forKey: @"mapiRetainCount"];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
[self warnWithFormat: @"message with mid %.16x not found"
|
[self warnWithFormat: @"message with mid %.16x not found"
|
||||||
|
|
|
@ -87,10 +87,10 @@ static MAPIStoreMapping *mapping;
|
||||||
*data = MAPILongLongValue (memCtx, 0);
|
*data = MAPILongLongValue (memCtx, 0);
|
||||||
break;
|
break;
|
||||||
case PR_ACCESS: // TODO
|
case PR_ACCESS: // TODO
|
||||||
*data = MAPILongValue (memCtx, 0x02);
|
*data = MAPILongValue (memCtx, 0x03);
|
||||||
break;
|
break;
|
||||||
case PR_ACCESS_LEVEL: // TODO
|
case PR_ACCESS_LEVEL: // TODO
|
||||||
*data = MAPILongValue (memCtx, 0x00000000);
|
*data = MAPILongValue (memCtx, 0x01);
|
||||||
break;
|
break;
|
||||||
case PR_VIEW_STYLE:
|
case PR_VIEW_STYLE:
|
||||||
case PR_VIEW_MAJORVERSION:
|
case PR_VIEW_MAJORVERSION:
|
||||||
|
|
|
@ -339,6 +339,10 @@ static Class NSDataK, NSStringK;
|
||||||
cachedRestrictedKeys = nil;
|
cachedRestrictedKeys = nil;
|
||||||
[cachedKeys release];
|
[cachedKeys release];
|
||||||
cachedKeys = nil;
|
cachedKeys = nil;
|
||||||
|
[lastChildKey release];
|
||||||
|
lastChildKey = nil;
|
||||||
|
[lastChild release];
|
||||||
|
lastChild = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) lookupChild: (NSString *) childKey
|
- (id) lookupChild: (NSString *) childKey
|
||||||
|
|
|
@ -132,7 +132,7 @@
|
||||||
task = [[self lookupChild: childKey] component: NO secure: NO];
|
task = [[self lookupChild: childKey] component: NO secure: NO];
|
||||||
status = [task status];
|
status = [task status];
|
||||||
if (![status length]
|
if (![status length]
|
||||||
|| [status isEqualToString: @"NEEDS-ACTIONS"])
|
|| [status isEqualToString: @"NEEDS-ACTION"])
|
||||||
statusValue = 0;
|
statusValue = 0;
|
||||||
else if ([status isEqualToString: @"IN-PROCESS"])
|
else if ([status isEqualToString: @"IN-PROCESS"])
|
||||||
statusValue = 1;
|
statusValue = 1;
|
||||||
|
|
|
@ -109,6 +109,11 @@
|
||||||
|
|
||||||
// MAPIStoreDumpMessageProperties (properties);
|
// MAPIStoreDumpMessageProperties (properties);
|
||||||
ASSIGN (content, [vCalendar versitString]);
|
ASSIGN (content, [vCalendar versitString]);
|
||||||
|
|
||||||
|
[fullCalendar release];
|
||||||
|
fullCalendar = nil;
|
||||||
|
[safeCalendar release];
|
||||||
|
safeCalendar = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#import <Foundation/NSArray.h>
|
||||||
#import <Foundation/NSDictionary.h>
|
#import <Foundation/NSDictionary.h>
|
||||||
#import <Foundation/NSString.h>
|
#import <Foundation/NSString.h>
|
||||||
#import <Foundation/NSValue.h>
|
#import <Foundation/NSValue.h>
|
||||||
|
@ -37,21 +38,15 @@
|
||||||
|
|
||||||
- (void) setMAPIProperties: (NSDictionary *) properties
|
- (void) setMAPIProperties: (NSDictionary *) properties
|
||||||
{
|
{
|
||||||
NGVCard *newCard, *oldCard;
|
NGVCard *newCard;
|
||||||
|
NSArray *elements;
|
||||||
|
CardElement *element;
|
||||||
|
int postalAddressId;
|
||||||
id value;
|
id value;
|
||||||
|
|
||||||
[self logWithFormat: @"setMAPIProperties: %@", properties];
|
[self logWithFormat: @"setMAPIProperties: %@", properties];
|
||||||
|
|
||||||
oldCard = [self vCard];
|
newCard = [self vCard];
|
||||||
if (isNew)
|
|
||||||
newCard = oldCard;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
newCard = [NGVCard new];
|
|
||||||
[newCard setUid: [oldCard uid]];
|
|
||||||
ASSIGN (card, newCard);
|
|
||||||
[newCard release];
|
|
||||||
}
|
|
||||||
[newCard setTag: @"vcard"];
|
[newCard setTag: @"vcard"];
|
||||||
[newCard setVersion: @"3.0"];
|
[newCard setVersion: @"3.0"];
|
||||||
[newCard setProdID: @"-//Inverse inc.//OpenChange+SOGo//EN"];
|
[newCard setProdID: @"-//Inverse inc.//OpenChange+SOGo//EN"];
|
||||||
|
@ -62,9 +57,93 @@
|
||||||
if (value)
|
if (value)
|
||||||
[newCard setFn: value];
|
[newCard setFn: value];
|
||||||
|
|
||||||
|
elements = [newCard childrenWithTag: @"email"];
|
||||||
value = [properties objectForKey: MAPIPropertyKey (PidLidEmail1EmailAddress)];
|
value = [properties objectForKey: MAPIPropertyKey (PidLidEmail1EmailAddress)];
|
||||||
if (value)
|
if (value)
|
||||||
[newCard addEmail: value types: nil];
|
{
|
||||||
|
if ([elements count] > 0)
|
||||||
|
[[elements objectAtIndex: 0] setValue: 0 to: value];
|
||||||
|
else
|
||||||
|
[newCard addEmail: value
|
||||||
|
types: [NSArray arrayWithObject: @"pref"]];
|
||||||
|
}
|
||||||
|
value = [properties objectForKey: MAPIPropertyKey (PidLidEmail2EmailAddress)];
|
||||||
|
if (value)
|
||||||
|
{
|
||||||
|
if ([elements count] > 1)
|
||||||
|
[[elements objectAtIndex: 1] setValue: 0 to: value];
|
||||||
|
else
|
||||||
|
[newCard addEmail: value types: nil];
|
||||||
|
}
|
||||||
|
value = [properties objectForKey: MAPIPropertyKey (PidLidEmail3EmailAddress)];
|
||||||
|
if (value)
|
||||||
|
{
|
||||||
|
if ([elements count] > 2)
|
||||||
|
[[elements objectAtIndex: 2] setValue: 0 to: value];
|
||||||
|
else
|
||||||
|
[newCard addEmail: value types: nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
postalAddressId = [[properties objectForKey: MAPIPropertyKey (PidLidPostalAddressId)]
|
||||||
|
intValue];
|
||||||
|
|
||||||
|
/* Work address */
|
||||||
|
value = [properties objectForKey: MAPIPropertyKey (PidLidWorkAddress)];
|
||||||
|
if ([value length])
|
||||||
|
{
|
||||||
|
elements = [newCard childrenWithTag: @"label"
|
||||||
|
andAttribute: @"type"
|
||||||
|
havingValue: @"work"];
|
||||||
|
if ([elements count] > 0)
|
||||||
|
element = [elements objectAtIndex: 0];
|
||||||
|
else
|
||||||
|
{
|
||||||
|
element = [CardElement elementWithTag: @"label"];
|
||||||
|
[element addAttribute: @"type" value: @"work"];
|
||||||
|
[card addChild: element];
|
||||||
|
}
|
||||||
|
if (postalAddressId == 2)
|
||||||
|
{
|
||||||
|
[element removeValue: @"pref"
|
||||||
|
fromAttribute: @"type"];
|
||||||
|
[element addAttribute: @"type"
|
||||||
|
value: @"pref"];
|
||||||
|
}
|
||||||
|
[element setValue: 0 to: value];
|
||||||
|
}
|
||||||
|
|
||||||
|
elements = [newCard childrenWithTag: @"adr"
|
||||||
|
andAttribute: @"type"
|
||||||
|
havingValue: @"work"];
|
||||||
|
if ([elements count] > 0)
|
||||||
|
element = [elements objectAtIndex: 0];
|
||||||
|
else
|
||||||
|
{
|
||||||
|
element = [CardElement elementWithTag: @"adr"];
|
||||||
|
[element addAttribute: @"type" value: @"work"];
|
||||||
|
[card addChild: element];
|
||||||
|
}
|
||||||
|
if (postalAddressId == 2)
|
||||||
|
[element addAttribute: @"type"
|
||||||
|
value: @"pref"];
|
||||||
|
value = [properties objectForKey: MAPIPropertyKey (PidLidWorkAddressPostOfficeBox)];
|
||||||
|
if (value)
|
||||||
|
[element setValue: 0 to: value];
|
||||||
|
value = [properties objectForKey: MAPIPropertyKey (PidLidWorkAddressStreet)];
|
||||||
|
if (value)
|
||||||
|
[element setValue: 2 to: value];
|
||||||
|
value = [properties objectForKey: MAPIPropertyKey (PidLidWorkAddressCity)];
|
||||||
|
if (value)
|
||||||
|
[element setValue: 3 to: value];
|
||||||
|
value = [properties objectForKey: MAPIPropertyKey (PidLidWorkAddressState)];
|
||||||
|
if (value)
|
||||||
|
[element setValue: 4 to: value];
|
||||||
|
value = [properties objectForKey: MAPIPropertyKey (PidLidWorkAddressPostalCode)];
|
||||||
|
if (value)
|
||||||
|
[element setValue: 5 to: value];
|
||||||
|
value = [properties objectForKey: MAPIPropertyKey (PidLidWorkAddressCountry)];
|
||||||
|
if (value)
|
||||||
|
[element setValue: 6 to: value];
|
||||||
|
|
||||||
ASSIGN (content, [newCard versitString]);
|
ASSIGN (content, [newCard versitString]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,8 +164,12 @@
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// MAPIStoreDumpMessageProperties (properties);
|
// MAPIStoreDumpMessageProperties (properties);
|
||||||
|
|
||||||
ASSIGN (content, [vCalendar versitString]);
|
ASSIGN (content, [vCalendar versitString]);
|
||||||
|
|
||||||
|
[fullCalendar release];
|
||||||
|
fullCalendar = nil;
|
||||||
|
[safeCalendar release];
|
||||||
|
safeCalendar = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -1253,9 +1253,9 @@ iRANGE(2);
|
||||||
currentOwnerIdentity = [currentUser defaultIdentity];
|
currentOwnerIdentity = [currentUser defaultIdentity];
|
||||||
|
|
||||||
currentOwnerProfile = [NSMutableDictionary dictionary];
|
currentOwnerProfile = [NSMutableDictionary dictionary];
|
||||||
[currentOwnerProfile setObject: [currentOwnerIdentity objectForKey: @"fullName"]
|
[currentOwnerProfile setObject: ([currentOwnerIdentity objectForKey: @"fullName"] == nil ? @"" : [currentOwnerIdentity objectForKey: @"fullName"])
|
||||||
forKey: @"name"];
|
forKey: @"name"];
|
||||||
[currentOwnerProfile setObject: [currentOwnerIdentity objectForKey: @"email"]
|
[currentOwnerProfile setObject: ([currentOwnerIdentity objectForKey: @"email"] == nil ? @"" : [currentOwnerIdentity objectForKey: @"email"])
|
||||||
forKey: @"email"];
|
forKey: @"email"];
|
||||||
[currentOwnerProfile setObject: @"accepted"
|
[currentOwnerProfile setObject: @"accepted"
|
||||||
forKey: @"partstat"];
|
forKey: @"partstat"];
|
||||||
|
|
Loading…
Reference in New Issue