]> err.no Git - scalable-opengroupware.org/blobdiff - SOGo/UI/Scheduler/iCalPerson+UIx.m
cleanup, bugfixes
[scalable-opengroupware.org] / SOGo / UI / Scheduler / iCalPerson+UIx.m
index acdd759b17edd4517e3e5e80ede16bc4830eb089..b923475ee372a60664d65d921171e136dd674942 100644 (file)
 
 @implementation iCalPerson(Convenience)
 
-- (NSString *)rfc822Email {
-  NSString *_email;
-  NSRange  colon;
-  
-  _email = [self email];
-  colon  = [_email rangeOfString:@":"];
-  
-  if (colon.length > 0)
-    return [_email substringFromIndex:(colon.location + colon.length)];
-  
-  return _email;
-}
-
 - (NSString *)cnForDisplay {
-  /* remove quotes around a CN */
-  NSString *_cn;
-  
-  _cn = [self cn];
-  if ([_cn length] <= 2)
-    return _cn;
-  if ([_cn characterAtIndex:0] != '"')
-    return _cn;
-  if (![_cn hasSuffix:@"\""])
-    return _cn;
-  
-  return [_cn substringWithRange:NSMakeRange(1, [_cn length] - 2)];
+  return [self cnWithoutQuotes];
 }
 
 @end /* iCalPerson(Convenience) */