From 046a46b86a4c35a29ceb4010b15884ce9a844489 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 2 Aug 2010 20:29:38 +0000 Subject: [PATCH] Monotone-Parent: 8330dfa1ad05eb096cee895845442bf564cf19bd Monotone-Revision: 76cddf6cb9e25f13d7e93aef3285f53fe726efcc Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-08-02T20:29:38 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ SoObjects/SOGo/NSNumber+Utilities.m | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3e60e74a5..dc4887a6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-08-02 Wolfgang Sourdeau + + * SoObjects/SOGo/NSNumber+Utilities.m (-jsonRepresentation): + returns "true" or "false" when the initial return value is "YES" + or "NO". + 2010-07-30 Francis Lachapelle * UI/WebServerResources/SchedulerUI.js (deleteEvent): improved diff --git a/SoObjects/SOGo/NSNumber+Utilities.m b/SoObjects/SOGo/NSNumber+Utilities.m index c71929e0f..1fac51667 100644 --- a/SoObjects/SOGo/NSNumber+Utilities.m +++ b/SoObjects/SOGo/NSNumber+Utilities.m @@ -28,8 +28,15 @@ - (NSString *) jsonRepresentation { + NSString *jsonRepresentation; - return [NSString stringWithFormat: @"%@", self]; + jsonRepresentation = [NSString stringWithFormat: @"%@", self]; + if ([jsonRepresentation isEqualToString: @"YES"]) + jsonRepresentation = @"true"; + else if ([jsonRepresentation isEqualToString: @"NO"]) + jsonRepresentation = @"false"; + + return jsonRepresentation; } @end