mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-05 16:35:10 +00:00
Monotone-Parent: c40151185171e3ba8a257569b8ab5ec86930d393
Monotone-Revision: 0efdaccbad84f567e4d9cc3ca0176e506620aefb Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-05-05T18:49:29 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
+11
-17
@@ -143,29 +143,23 @@
|
||||
|
||||
- (WOResponse *) propertiesAction
|
||||
{
|
||||
NSArray *references;
|
||||
NSMutableArray *data;
|
||||
NGVCardReference *card;
|
||||
WOResponse *rc;
|
||||
int i, count;
|
||||
int count, max;
|
||||
|
||||
data = [NSMutableArray array];
|
||||
co = [self clientObject];
|
||||
list = [co vList];
|
||||
|
||||
count = [[list cardReferences] count];
|
||||
for (i = 0; i < count; i++)
|
||||
list = [[self clientObject] vList];
|
||||
references = [list cardReferences];
|
||||
max = [references count];
|
||||
data = [NSMutableArray arrayWithCapacity: max];
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
card = [[list cardReferences] objectAtIndex: i];
|
||||
[data addObject: [NSArray arrayWithObjects: [card reference], [card fn],
|
||||
[card email], nil]];
|
||||
card = [references objectAtIndex: count];
|
||||
[data addObject: [NSArray arrayWithObjects: [card reference],
|
||||
[card fn], [card email], nil]];
|
||||
}
|
||||
|
||||
rc = [context response];
|
||||
[rc setHeader: @"text/plain; charset=utf-8"
|
||||
forKey: @"content-type"];
|
||||
[rc appendContentString: [data jsonRepresentation]];
|
||||
|
||||
return rc;
|
||||
return [self responseWithStatus: 200 andJSONRepresentation: data];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user