]> err.no Git - scalable-opengroupware.org/commitdiff
cleanup, bugfixes
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 13 Dec 2004 18:50:07 +0000 (18:50 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 13 Dec 2004 18:50:07 +0000 (18:50 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@475 d1b88da0-ebda-0310-925b-ed51d893ca5b

13 files changed:
SOGo/SoObjects/Appointments/SOGoAppointmentFolder.h
SOGo/SoObjects/Appointments/SOGoAppointmentFolder.m
SOGo/SoObjects/Appointments/SOGoAppointmentObject.m
SOGo/SoObjects/Appointments/Version
SOGo/SoObjects/ChangeLog
SOGo/UI/Scheduler/ChangeLog
SOGo/UI/Scheduler/UIxAppointmentProposal.m
SOGo/UI/Scheduler/Version
SOGo/UI/Scheduler/iCalPerson+UIx.h
SOGo/UI/Scheduler/iCalPerson+UIx.m
SOGoLogic/ChangeLog
SOGoLogic/SOGoAppointment.m
SOGoLogic/Version

index 51949c80b394d3f5ba6882b9248261625e8b0d50..882018c07379c747b1b4fce3b77122723d5c9547 100644 (file)
 
 /* fetching */
 
+- (NSArray *)fetchFields:(NSArray *)_fields
+  fromFolder:(OCSFolder *)_folder
+  from:(NSCalendarDate *)_startDate
+  to:(NSCalendarDate *)_endDate;
+
 - (NSArray *)fetchCoreInfosFromFolder:(OCSFolder *)_folder
   from:(NSCalendarDate *)_startDate
   to:(NSCalendarDate *)_endDate;
index 0ab3d8bde20ea97e89aa05b408a1661aa458d498..ee44b286f74e8b9df3946e679ee1075ba43dd341 100644 (file)
@@ -173,7 +173,8 @@ static NSTimeZone *MET = nil;
   return ma;
 }
 
-- (NSArray *)fetchCoreInfosFromFolder:(OCSFolder *)_folder
+- (NSArray *)fetchFields:(NSArray *)_fields
+  fromFolder:(OCSFolder *)_folder
   from:(NSCalendarDate *)_startDate
   to:(NSCalendarDate *)_endDate 
 {
@@ -194,15 +195,8 @@ static NSTimeZone *MET = nil;
                  (unsigned int)[_endDate   timeIntervalSince1970],
                  (unsigned int)[_startDate timeIntervalSince1970]];
   qualifier = [EOQualifier qualifierWithQualifierFormat:sql];
-  
-  fields = [NSArray arrayWithObjects:
-                     @"uid", @"startdate", @"enddate",
-                     @"title", @"participants", @"location", @"isallday",
-                     @"iscycle", @"partmails", @"sequence", @"ispublic",
-          @"isopaque", @"status", @"orgmail",
-                   nil];
-  
-  records = [_folder fetchFields:fields matchingQualifier:qualifier];
+
+  records = [_folder fetchFields:_fields matchingQualifier:qualifier];
   if (records == nil) {
     [self errorWithFormat:@"(%s): fetch failed!", __PRETTY_FUNCTION__];
     return nil;
@@ -214,6 +208,26 @@ static NSTimeZone *MET = nil;
   return records;
 }
 
+- (NSArray *)fetchCoreInfosFromFolder:(OCSFolder *)_folder
+  from:(NSCalendarDate *)_startDate
+  to:(NSCalendarDate *)_endDate 
+{
+  static NSArray *coreInfos = nil;
+  if(!coreInfos) {
+    coreInfos = [[NSArray arrayWithObjects:@"uid", @"startdate", @"enddate",
+                                           @"title", @"participants",
+                                           @"location", @"isallday",
+                                           @"iscycle", @"partmails",
+                                           @"sequence", @"ispublic",
+                                           @"isopaque", @"status", @"orgmail",
+                                           nil] retain];
+  }
+  return [self fetchInfos:coreInfos
+               fromFolder:_folder
+               from:_startDate
+               to:_endDate];
+}
+
 - (NSArray *)fetchCoreInfosFrom:(NSCalendarDate *)_startDate
   to:(NSCalendarDate *)_endDate 
 {
@@ -327,10 +341,8 @@ static NSTimeZone *MET = nil;
     NSString   *uid;
     
     person = [_persons objectAtIndex:i];
-    email  = [person email];
+    email  = [person rfc822Email];
     if ([email isNotNull]) {
-      if ([email hasPrefix:@"mailto:"])
-        email = [email substringFromIndex:7];
       uid = [um getUIDForEmail:email];
     }
     else
index 9da8460392b07c04894bde6886f2d7ec534f3c10..70250582c21590439dd95d6a75f462fab6bad6d4 100644 (file)
   
   /* add organizer */
   
-  email = [[_apt organizer] email];
+  email = [[_apt organizer] rfc822Email];
   if ([email isNotNull]) {
     uid = [um getUIDForEmail:email];
     if ([uid isNotNull]) {
-      if ([uid hasPrefix:@"mailto:"])
-       uid = [uid substringFromIndex:7];
       [uids addObject:uid];
     }
     else
@@ -77,7 +75,7 @@
     iCalPerson *person;
     
     person = [attendees objectAtIndex:i];
-    email  = [person email];
+    email  = [person rfc822Email];
     if (![email isNotNull]) continue;
     
     uid = [um getUIDForEmail:email];
@@ -85,9 +83,6 @@
       [self logWithFormat:@"Note: got no uid for email: '%@'", email];
       continue;
     }
-    if ([uid hasPrefix:@"mailto:"])
-      uid = [uid substringFromIndex:7];
-
     if (![uids containsObject:uid])
       [uids addObject:uid];
   }
index faf0dee1f5f07b9acc94a35e00687a72c92232ae..8d72819a34eb75c0f06a67b5973e81920a40e823 100644 (file)
@@ -1,5 +1,6 @@
 # Version file
 
-SUBMINOR_VERSION:=17
+SUBMINOR_VERSION:=19
 
+# v0.9.19 requires NGiCal  v4.5.36
 # v0.9.13 requires libSOGo v0.9.26
index 0fccfece100c7086b59ab68a1f821c6b4f6bc09c..35b5f5d4e5b12c0dcaca795c691225a34af0c887 100644 (file)
@@ -1,5 +1,11 @@
 2004-12-13  Marcus Mueller  <znek@mulle-kybernetik.com>
 
+       * v0.9.19
+
+       * Appointments/SOGoAppointmentFolder.[hm]: new method to fetch generic
+         fields (better suited for freebusy), fixed some "mailto:" prefix
+         madness
+
        * Appointments/SOGoAppointmentFolder.m: fixed bug in
          -uidsFromICalPersons: (v0.9.18)
 
index b507aef1f4168c64a522fed3ab7db59841a03f8c..3c601aaa59018efdcce16ff1c0390140dcc18fc0 100644 (file)
@@ -1,5 +1,12 @@
 2004-12-13  Marcus Mueller  <znek@mulle-kybernetik.com>
 
+       * v0.9.101
+
+       * UIxAppointmentProposal.m: removed inclusion of iCalPerson+UIx.h
+
+       * iCalPerson+UIx.[hm]: removed -rfc822EMail (moved to NGiCal), changed
+         implementation of -cnForDisplay (just a cover for -cnWithoutQuotes)
+
        * v0.9.100
        
        * UIxAppointmentEditor.m: fixed incorrect redirect location
index fdeee2a63d2a9a3916b51e1fde9d450e5439cad5..b3a3a315d85f81aeaf474fca92d12edccfc1049a 100644 (file)
@@ -56,7 +56,6 @@
 
 #include <SoObjects/Appointments/SOGoAppointmentFolder.h>
 #include <NGExtensions/NGCalendarDateRange.h>
-#include "iCalPerson+UIx.h"
 #include "common.h"
 
 @implementation UIxAppointmentProposal
index d202ae6148f6cb002e3893b2ba0d4672f2dafcf3..ca26afff44a2682343da9fcf28f0eea21b45d606 100644 (file)
@@ -1,7 +1,8 @@
 # $Id$
 
-SUBMINOR_VERSION:=100
+SUBMINOR_VERSION:=101
 
+# v0.9.101 requires NGiCal       v4.5.36
 # v0.9.100 requires SOGoUI       v0.9.21
 # v0.9.99  requires SOGoUI       v0.9.20
 # v0.9.98  requires SOGoUI       v0.9.19
index 7417aa6278284715eb3595730fde23558f2470d6..02658aaf7993a7523cd69b026eb307a518a3a08b 100644 (file)
@@ -28,7 +28,6 @@
 @class NSString;
 
 @interface iCalPerson(Convenience)
-- (NSString *)rfc822Email;
 - (NSString *)cnForDisplay;
 @end
 
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) */
index 9c9b89b271462bb8a6d532d35b36f3522b0d44e8..fa432734044b43bc1c37dd06b8d51292aae70966 100644 (file)
@@ -1,5 +1,8 @@
 2004-12-13  Marcus Mueller  <znek@mulle-kybernetik.com>
 
+       * SOGoAppointment.m: removed UIx_Privates declaration (no longer
+         necessary) (v0.9.31)
+
        * SOGoUserManager.m: added comment regarding mapping uid <->mail
          (v0.9.30)
 
index 5d25963b473ed1463dfb991fd8d6e46dd551fa75..06c7c116d32a26b1264b86f9a6725f6ead167ca1 100644 (file)
 #include "SOGoAppointmentICalRenderer.h"
 #include "common.h"
 
-@interface iCalPerson(UIx_Privates)
-- (NSString *)rfc822Email;
-@end
-
 @interface SOGoAppointment (PrivateAPI)
 - (NSArray *)_filteredAttendeesThinkingOfPersons:(BOOL)_persons;
 @end
index 3a959fbe056c6472520c7130bb5f6a0bad1d5e95..6a99300f7c03a06d68864e43a507bbf8fc64e4c1 100644 (file)
@@ -1,7 +1,8 @@
 # Version file
 
-SUBMINOR_VERSION:=30
+SUBMINOR_VERSION:=31
 
+# v0.9.31 requires NGiCal        v4.5.36
 # v0.9.26 requires NGExtensions  v4.5.136
 # v0.9.23 requires NGiCal        v4.3.32
 # v0.9.18 requires NGExtensions  v4.3.123