mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-23 04:15:26 +00:00
Monotone-Parent: dd419c699778aed41ce0f743264562f00f9a7225
Monotone-Revision: 6d72460fc711cc8527393aeb0db47f3667ce0f88 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-10-23T21:59:46 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
2007-10-23 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/NSArray+Utilities.m
|
||||
([NSArray -stringsWithFormat:format]): replace instances of NSNull
|
||||
with empty strings.
|
||||
|
||||
* SoObjects/SOGo/NSDictionary+Utilities.m ([NSDictionary
|
||||
-keysWithFormat:keyFormat]): replace instances of NSNull with
|
||||
empty strings.
|
||||
|
||||
* SoObjects/Contacts/SOGoContactLDAPFolder.m: if "displayName" is
|
||||
empty, use "c_cn" instead.
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSNull.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#import "NSArray+Utilities.h"
|
||||
@@ -38,8 +39,11 @@
|
||||
currentObject = [objects nextObject];
|
||||
while (currentObject)
|
||||
{
|
||||
[formattedStrings
|
||||
addObject: [NSString stringWithFormat: format, currentObject]];
|
||||
if ([currentObject isKindOfClass: [NSNull class]])
|
||||
[formattedStrings addObject: @""];
|
||||
else
|
||||
[formattedStrings
|
||||
addObject: [NSString stringWithFormat: format, currentObject]];
|
||||
currentObject = [objects nextObject];
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSData.h>
|
||||
#import <Foundation/NSNull.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#import "NSArray+Utilities.h"
|
||||
@@ -89,8 +90,12 @@
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
value = [self objectForKey: [allKeys objectAtIndex: count]];
|
||||
[keysWithFormat replaceString: [keys objectAtIndex: count]
|
||||
withString: [value description]];
|
||||
if ([value isKindOfClass: [NSNull class]])
|
||||
[keysWithFormat replaceString: [keys objectAtIndex: count]
|
||||
withString: @""];
|
||||
else
|
||||
[keysWithFormat replaceString: [keys objectAtIndex: count]
|
||||
withString: [value description]];
|
||||
}
|
||||
|
||||
return keysWithFormat;
|
||||
|
||||
Reference in New Issue
Block a user