Monotone-Parent: 77ae6659af75997724f5042923c200e84f904c7c

Monotone-Revision: c9af41ca9ec70a19cc4d97559b662f72c45c4f97

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-10-16T18:43:14
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2006-10-16 18:43:14 +00:00
parent 997b801ee7
commit bcf6d7f1c5
2 changed files with 11 additions and 1 deletions

View File

@@ -1,5 +1,9 @@
2006-10-16 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Appointments/SOGoAppointmentFolder.m
([SOGoAppointmentFolder
-fetchFields:_fieldsfromFolder:_folderfrom:_startDateto:_endDatecomponent:_component]): associate each returned record with the owner of the table they are retrieved from.
* SoObjects/SOGo/NSObject+Owner.[hm]: new extension module to
NSObject to associate an instance with a user.

View File

@@ -21,6 +21,7 @@
#import <SOGo/SOGoCustomGroupFolder.h>
#import <SOGo/AgenorUserManager.h>
#import <SOGo/NSObject+Owner.h>
#import <GDLContentStore/GCSFolder.h>
#import <SaxObjC/SaxObjC.h>
#import <NGCards/NGCards.h>
@@ -579,7 +580,7 @@ static NSNumber *sharedYes = nil;
EOQualifier *qualifier;
NSMutableArray *fields, *ma = nil;
NSArray *records;
NSString *sql, *dateSqlString, *componentSqlString;
NSString *sql, *dateSqlString, *componentSqlString, *owner;
NGCalendarDateRange *r;
if (_folder == nil) {
@@ -649,6 +650,8 @@ static NSNumber *sharedYes = nil;
records = [self fixupCyclicRecords: records fetchRange: r];
if (!ma)
ma = [NSMutableArray arrayWithCapacity: [records count]];
owner = [self ownerInContext: nil];
[ma addObjectsFromArray: records];
}
else if (!ma)
@@ -666,6 +669,9 @@ static NSNumber *sharedYes = nil;
if (logger)
[self debugWithFormat:@"returning %i records", [ma count]];
[ma makeObjectsPerformSelector: @selector (setOwnerByLogin:)
withObject: owner];
return ma;
}