From 1746d307f339b8c82aed681d25958966871d6b55 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 16 Jan 2012 20:18:39 +0000 Subject: [PATCH] Monotone-Parent: 10bc75b22aa9828644f846e67ae3509d61793864 Monotone-Revision: 181c204ddec5a60db59ce4a63428f75cb20a7a81 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-01-16T20:18:39 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ SoObjects/SOGo/SQLSource.m | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7fb0e286e..2312c00a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-01-16 Wolfgang Sourdeau + + * SoObjects/SOGo/SQLSource.m (_lookupContactEntry:considerEmail:) + (fetchContactsMatching:): assigned self to the "source" key of the + returned dictionaries. + 2012-01-13 Francis Lachapelle * SoObjects/Appointments/SOGoAppointmentFolder.m diff --git a/SoObjects/SOGo/SQLSource.m b/SoObjects/SOGo/SQLSource.m index 441808915..59bdf969e 100644 --- a/SoObjects/SOGo/SQLSource.m +++ b/SoObjects/SOGo/SQLSource.m @@ -572,6 +572,8 @@ forKey: @"numberOfSimultaneousBookings"]; } } + + [response setObject: self forKey: @"source"]; } else [self errorWithFormat: @"could not run SQL '%@': %@", sql, ex]; @@ -678,7 +680,12 @@ attrs = [channel describeResults: NO]; while ((row = [channel fetchAttributes: attrs withZone: NULL])) - [results addObject: row]; + { + row = [row mutableCopy]; + [(NSMutableDictionary *) row setObject: self forKey: @"source"]; + [results addObject: row]; + [row release]; + } } else [self errorWithFormat: @"could not run SQL '%@': %@", sql, ex];