]> err.no Git - scalable-opengroupware.org/commitdiff
contact folder implementation v1
authorhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 26 Aug 2004 23:29:09 +0000 (23:29 +0000)
committerhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 26 Aug 2004 23:29:09 +0000 (23:29 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@278 d1b88da0-ebda-0310-925b-ed51d893ca5b

16 files changed:
SOGo/SoObjects/Contacts/ChangeLog
SOGo/SoObjects/Contacts/SOGoContactFolder.h
SOGo/SoObjects/Contacts/SOGoContactFolder.m
SOGo/SoObjects/Contacts/SOGoContactObject.m
SOGo/SoObjects/Contacts/Version
SOGo/UI/Common/ChangeLog
SOGo/UI/Common/UIxPageFrame.m
SOGo/UI/Common/UIxPageFrame.wox
SOGo/UI/Common/Version
SOGo/UI/Common/uix.css
SOGo/UI/Contacts/ChangeLog
SOGo/UI/Contacts/UIxContactsListView.wox
SOGo/UI/Contacts/Version
SOGo/UI/Contacts/product.plist
SOGo/UI/Scheduler/ChangeLog
SOGo/UI/Scheduler/UIxCalView.m

index 1c480288eb3afcbe063959e00808fb6007c677bc..3b21ef60c903e13447fc8bb38bd678c292b57624 100644 (file)
@@ -1,3 +1,7 @@
+2004-08-27  Helge Hess  <helge.hess@skyrix.com>
+       
+       * started implementation of contact folders (v0.9.1)
+
 2004-08-26  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * Product.m: typo in comment fixed
index 4d501abd6ce227142fcb38e425ccfb0e6e5772ce..6c61e4b61f5c7d7ad62e31d5c76ca36bac1bf5f2 100644 (file)
 
 + (NSString *)globallyUniqueObjectId;
 
-/* selection */
-
-- (NSArray *)contactUIDs;
-
 /* fetching */
 
-- (NSArray *)fetchCoreInfosFrom:(NSCalendarDate *)_startDate
-  to:(NSCalendarDate *)_endDate;
-
-- (NSArray *)fetchCoreInfosFromFolder:(OCSFolder *)_folder
-  from:(NSCalendarDate *)_startDate
-  to:(NSCalendarDate *)_endDate;
-
-/* URL generation */
-
-- (NSString *)baseURLForContactWithUID:(NSString *)_uid inContext:(id)_ctx;
-
-/* folder management */
-
-- (id)lookupHomeFolderForUID:(NSString *)_uid inContext:(id)_ctx;
-
-- (NSArray *)lookupContactFoldersForUIDs:(NSArray *)_uids inContext:(id)_ctx;
+- (NSArray *)fetchCoreInfos;
 
 @end
 
index 8d9a542fd614aa0fe3e8f06342b825d902d4f9a8..849a3722836b8078c164f17273c7e4872f579758 100644 (file)
 
 @implementation SOGoContactFolder
 
-static BOOL       debugOn = NO;
-static NSTimeZone *MET = nil;
-
-+ (void)initialize {
-  if (MET == nil) MET = [[NSTimeZone timeZoneWithAbbreviation:@"MET"] retain];
-}
+static BOOL debugOn = YES;
 
 + (NSString *)globallyUniqueObjectId {
   /*
@@ -63,15 +58,6 @@ static NSTimeZone *MET = nil;
   [super dealloc];
 }
 
-/* selection */
-
-- (NSArray *)contactUIDs {
-  NSString *s;
-
-  s = [[self container] nameInContainer];
-  return [s isNotNull] ? [NSArray arrayWithObjects:&s count:1] : nil;
-}
-
 /* name lookup */
 
 - (BOOL)isValidContactName:(NSString *)_key {
@@ -112,133 +98,27 @@ static NSTimeZone *MET = nil;
 
 /* fetching */
 
-- (NSMutableDictionary *)fixupRecord:(NSDictionary *)_record {
-  NSMutableDictionary *md;
-  id tmp;
-  
-  md = [[_record mutableCopy] autorelease];
-#warning !! IMPLEMENT ME!
-  return md;
-}
-
 - (NSArray *)fixupRecords:(NSArray *)_records {
-  NSMutableArray *ma;
-  unsigned i, count;
-
-  if (_records == nil) return nil;
-  if ((count = [_records count]) == 0)
-    return _records;
-  
-  ma = [NSMutableArray arrayWithCapacity:count];
-  for (i = 0; i < count; i++) {
-    id row;
-    
-    row = [self fixupRecord:[_records objectAtIndex:i]];
-    if (row) [ma addObject:row];
-  }
-  return ma;
-}
-
-- (NSArray *)fetchCoreInfosFromFolder:(OCSFolder *)_folder
-             from:(NSCalendarDate *)_startDate
-             to:(NSCalendarDate *)_endDate 
-{
-#warning !! IMPLEMENT ME!
-  return nil;
-}
-
-- (NSArray *)fetchCoreInfosFrom:(NSCalendarDate *)_startDate
-  to:(NSCalendarDate *)_endDate 
-{
-  /* this is the primary API */
-  OCSFolder *folder;
-  
-  if ((folder = [self ocsFolder]) == nil) {
-    [self logWithFormat:@"ERROR(%s): missing folder for fetch!",
-           __PRETTY_FUNCTION__];
-    return nil;
-  }
-  return [self fetchCoreInfosFromFolder:folder from:_startDate to:_endDate];
-}
-
-/* URL generation */
-
-- (NSString *)baseURLForContactWithUID:(NSString *)_uid inContext:(id)_ctx {
-  NSString *url;
-  
-  if ([_uid length] == 0)
-    return nil;
-  
-  url = [self baseURLInContext:_ctx];
-  if (![url hasSuffix:@"/"])
-    url = [url stringByAppendingString:@"/"];
-  return [url stringByAppendingString:_uid];
+  return _records;
 }
 
-/* folder management */
-
-- (id)lookupHomeFolderForUID:(NSString *)_uid inContext:(id)_ctx {
-  // TODO: DUP to SOGoGroupFolder
-  NSException *error = nil;
-  NSArray     *path;
-  id          ctx, result;
-
-  if (![_uid isNotNull])
+- (NSArray *)fetchCoreInfos {
+  NSArray     *fields, *records;
+
+  fields = [NSArray arrayWithObjects:
+                     @"c_name",
+                     @"sn", @"givenname", @"l", 
+                     @"mail", @"telephonenumber",
+                   nil];
+  records = [[self ocsFolder] fetchFields:fields matchingQualifier:nil];
+  if (records == nil) {
+    [self logWithFormat:@"ERROR(%s): fetch failed!", __PRETTY_FUNCTION__];
     return nil;
-  
-  if (_ctx == nil) _ctx = [[WOApplication application] context];
-  
-  /* create subcontext, so that we don't destroy our environment */
-  
-  if ((ctx = [_ctx createSubContext]) == nil) {
-    [self logWithFormat:@"ERROR: could not create SOPE subcontext!"];
-    return nil;
-  }
-  
-  /* build path */
-  
-  path = _uid != nil ? [NSArray arrayWithObjects:&_uid count:1] : nil;
-  
-  /* traverse path */
-  
-  result = [[ctx application] traversePathArray:path inContext:ctx
-                             error:&error acquire:NO];
-  if (error != nil) {
-    [self logWithFormat:@"ERROR: folder lookup failed (uid=%@): %@",
-           _uid, error];
-    return nil;
-  }
-  
-  [self debugWithFormat:@"Note: got folder for uid %@ path %@: %@",
-         _uid, [path componentsJoinedByString:@"=>"], result];
-  return result;
-}
-
-- (NSArray *)lookupContactFoldersForUIDs:(NSArray *)_uids inContext:(id)_ctx {
-  /* Note: can return NSNull objects in the array! */
-  NSMutableArray *folders;
-  NSEnumerator *e;
-  NSString     *uid;
-  
-  if ([_uids count] == 0) return nil;
-  folders = [NSMutableArray arrayWithCapacity:16];
-  e = [_uids objectEnumerator];
-  while ((uid = [e nextObject])) {
-    id folder;
-    
-    folder = [self lookupHomeFolderForUID:uid inContext:nil];
-    if ([folder isNotNull]) {
-      folder = [folder lookupName:@"Contacts" inContext:nil acquire:NO];
-      if ([folder isKindOfClass:[NSException class]])
-       folder = nil;
-    }
-    if (![folder isNotNull])
-      [self logWithFormat:@"Note: did not find folder for uid: '%@'", uid];
-    
-    /* Note: intentionally add 'null' folders to allow a mapping */
-    [folders addObject:folder ? folder : [NSNull null]];
   }
-  return folders;
+  records = [self fixupRecords:records];
+  if (debugOn)
+    [self logWithFormat:@"fetched %i records: %@", [records count], records];
+  return records;
 }
 
 /* GET */
@@ -246,13 +126,17 @@ static NSTimeZone *MET = nil;
 - (id)GETAction:(WOContext *)_ctx {
   // TODO: I guess this should really be done by SOPE (redirect to
   //       default method)
+  WOResponse *r;
   NSString *uri;
 
   uri = [[_ctx request] uri];
   if (![uri hasSuffix:@"/"]) uri = [uri stringByAppendingString:@"/"];
   uri = [uri stringByAppendingString:@"view"];
   
-  return [self redirectToLocation:uri];
+  r = [_ctx response];
+  [r setStatus:302 /* moved */];
+  [r setHeader:uri forKey:@"location"];
+  return r;
 }
 
 @end /* SOGoContactFolder */
index 0e0be03a70b68943c305194e39c2fa3e276f8df4..cbd6b6cb5dfcb2ebeaae3338e6e43daf35ee0527 100644 (file)
 
 /* accessors */
 
+/* GET */
+
+- (id)GETAction:(WOContext *)_ctx {
+  // TODO: I guess this should really be done by SOPE (redirect to
+  //       default method)
+  WOResponse *r;
+  NSString *uri;
+
+  uri = [[_ctx request] uri];
+  if (![uri hasSuffix:@"/"]) uri = [uri stringByAppendingString:@"/"];
+  uri = [uri stringByAppendingString:@"view"];
+  
+  r = [_ctx response];
+  [r setStatus:302 /* moved */];
+  [r setHeader:uri forKey:@"location"];
+  return r;
+}
+
 @end /* SOGoContactObject */
index 9385a64dc7a2742a1c9d7548d97774a250f7307f..237a59049190fb100f4d3a877ebcfed082bc30dc 100644 (file)
@@ -1,3 +1,3 @@
 # $Id$
 
-SUBMINOR_VERSION:=0
+SUBMINOR_VERSION:=1
index a24ee4b45b614075048aa73f9f832e7a27f71e99..376866e8b86eecc92218f3e3963404f4f5318804 100644 (file)
@@ -1,5 +1,10 @@
 2004-08-27  Helge Hess  <helge.hess@skyrix.com>
 
+       * uix.css: make 'defaultfont' a generic class
+
+       * UIxPageFrame.wox: added top-level menu with links for Calendar and
+         Contacts (v0.9.18)
+
        * removed old components (UIxAppFrame, Header and Navigation) (v0.9.17)
 
 2004-08-24  Maxime Wacker  <mwacker@linagora.com>
index 380d73a70989bacd8936fddba86db01d38453570..3ff669631e08fada3a6011cb09aec0d4b2520199 100644 (file)
@@ -74,5 +74,8 @@
 - (NSString *)calendarRootURL {
   return [[self userRootURL] stringByAppendingString:@"Calendar/"];
 }
+- (NSString *)contactsRootURL {
+  return [[self userRootURL] stringByAppendingString:@"Contacts/"];
+}
 
 @end /* UIxPageFrame */
index fb5ebd14014f4e62323295821c26da0b1211cd93..82efe4dd78b1f29022d7cee13f7fce110f366792 100644 (file)
     <link href="mailto:hh@skyrix.com" rev="made"/>
   </head>
   <body>
+    <div style="padding: 5px;">
+      <a var:href="calendarRootURL">Calendar</a> |
+      <a var:href="contactsRootURL">Addressbook</a>
+    </div>
+
+    <table cellpadding="0" cellspacing="0" border="0" width="100%">
+      <tr>
+        <td class="linecolor">
+          <img rsrc:src="line_left.gif"/>
+        </td>
+        <td class="linecolor" width="100%">
+          <img rsrc:src="line_stretch.gif"/>
+        </td>
+        <td class="linecolor">
+          <img rsrc:src="line_right.gif"/>
+        </td>
+      </tr>
+      <tr>
+        <td colspan="3"/>
+      </tr>
+    </table>
     <table cellpadding="5" cellspacing="0" border="0" width="100%">
       <tr>
         <td colspan="2">
index 33dfbe1b04726220aa5142e7e070a02c182f5657..cd35ad0fc7134df7fcc93aab18344f258f338c2b 100644 (file)
@@ -1,3 +1,3 @@
 # $Id$
 
-SUBMINOR_VERSION:=17
+SUBMINOR_VERSION:=18
index 90657cd26ff2c3844cc4a5552fe6b37074025179..5d45c0713fe08545ccc63acd410cdbd586515fbb 100644 (file)
@@ -34,7 +34,7 @@ a:hover {
   background-color: #06348B;
 }
 
-font.defaultfont {
+.defaultfont {
   text-decoration:  none;
   font-family:      Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif;
   font-size:        8pt;
index 7c6d452282a679fd329c16b669b1cafe3f04b7d8..23ad47021d398856495cc96713871f4549fbebdf 100644 (file)
@@ -1,3 +1,8 @@
+2004-08-27  Helge Hess  <helge.hess@skyrix.com>
+
+       * removed GET from product.plist, the SoObject directly implements GET
+         now and redirects to the view method (v0.9.3)
+       
 2004-08-26  Helge Hess  <helge.hess@skyrix.com>
 
        * product.plist: more fixes to product.plist (v0.9.2)
index 7f53e297705a3f1445658fe412ecf84ee220902f..62a70caa408adeb557f8702b30e2d4b19666a4dc 100644 (file)
@@ -7,8 +7,117 @@
                className="UIxPageFrame"
                title="name"
 >
+  <style>
+    table.contacttableview {
+      text-decoration:  none;
+      font-family:      Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif;
+      font-size:        9pt;
+      color:            #000000;
+    }
+    table.contacttableview th {
+      text-align: left;
+    }
+  </style>
+  <table id="skywintable"
+         class="wintable"
+         cellspacing="0"
+         cellpadding="5"
+         width="100%"
+  >
+    <tr>
+      <td class="wintitle">
+        <table cellpadding="0" cellspacing="0" width="100%">
+          <tr>
+            <td width="5"/>
+            <td class="wintitle">
+              <!-- localize me -->
+              <span class="window_label">Addressbook</span>
+            </td>
+            <td width="36" align="right" valign="center">
+              <var:component className="UIxWinClose"/>
+            </td>
+          </tr>
+        </table>
+      </td>
+    </tr>
+    <tr>
+      <td id="skywinbodycell" class="wincontent">
+        <table border="0" width="100%" cellpadding="0" cellspacing="0">
+          <tr>
+            <td colspan="2">
+                <table border="0" cellpadding="4" width="100%" cellspacing="2">
+                  <tr>
+                    <td align="right" bgcolor="#e8e8e0">
+                      <table border="0" cellpadding="0" cellspacing="1">
+                        <tr>
+                          <td class="button_auto_env"
+                              nowrap="true"
+                              valign="middle"
+                              align="center"
+                          >
+                            <a class="button_auto"
+                               href="new"
+                               var:queryDictionary="queryParameters"
+                            ><var:string label:value="new"/></a>
+                          </td>
+                        </tr>
+                      </table>
+                    </td>
+                  </tr>
+                </table>
+
+                <!-- the content -->
+                <table border="0" width="100%" class="contacttableview">
+                  <tr>
+                    <!-- localize -->
+                    <th>Lastname</th>
+                    <th>Firstname</th>
+                    <th>Email</th>
+                    <th>Phone</th>
+                    <th>Location</th>
+                  </tr>
+                  <var:foreach list="clientObject.fetchCoreInfos" 
+                               item="contact">
+                    <tr>
+                      <td>
+                        <a var:href="contact.cName"
+                           ><var:string value="contact.sn" /></a>
+                      </td>
+                      <td><var:string value="contact.givenname"       /></td>
+                      <td><var:string value="contact.mail"            /></td>
+                      <td><var:string value="contact.telephonenumber" /></td>
+                      <td><var:string value="contact.l"               /></td>
+                    </tr>
+                  </var:foreach>
+                </table>
+            </td>
+          </tr>
+
+          <tr bgcolor="#F5F5E9">
+            <td align="left" width="10">
+              <var:entity const:name="nbsp"/>
+            </td>
+            <td align="right">
+              <img border="0"
+                   alt=""
+                   src="/sogod.woa/so/ControlPanel/Products/CommonUI/Resources/corner_right.gif"
+              />
+            </td>
+          </tr>
+          <tr>
+            <td colspan="2" bgcolor="#F5F5E9">
+              <table border="0" width="100%" cellpadding="10" cellspacing="0">
+                <tr/>
+              </table>
+            </td>
+          </tr>
+        </table>
+      </td>
+    </tr>
+  </table>
+
   <var:if condition="isUIxDebugEnabled">
     <hr />
-    clientObject: <var:string value="clientObject" />
+    <small>clientObject: <var:string value="clientObject" /></small>
   </var:if>
 </var:component>
\ No newline at end of file
index 1bf86739af6e070f2b3946837285f951d5e6a275..fc795f55c1387b14d99ba68f17adc4f527276f1f 100644 (file)
@@ -1,3 +1,3 @@
 # $Id$
 
-SUBMINOR_VERSION:=2
+SUBMINOR_VERSION:=3
index 824650798b0f8522a4a7a24f8795468111318a0e..850db67787e0a3e254b46ce250587180585ee8ac 100644 (file)
           protectedBy = "View";
           pageName    = "UIxContactsListView"; 
         };
-        GET = { /* hack to make it work as the default method */
-          protectedBy = "View";
-          pageName    = "UIxContactsListView"; 
-        };
       };
     };
 
index abf4851cab8f88d248f6071ab1bf16755338d969..345e6de33bfae4157bec17105aebb2693fa11160 100644 (file)
@@ -1,3 +1,7 @@
+2004-08-27  Helge Hess  <helge.hess@skyrix.com>
+
+       * UIxCalView.m: minor code cleanups (v0.9.72)
+
 2004-08-25  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * GNUmakefile.preamble: removed NGScripting from dependencies - it's no
index e37aedab05a3243abd8290cd6393b5f53fd76fae..eedbbf8e507bb5b33de561631b991f6fea4d0e7c 100644 (file)
@@ -24,11 +24,11 @@ static BOOL shouldDisplayWeekend = NO;
 }
 
 - (void)dealloc {
-  [self->appointments release];
-  [self->allDayApts release];
-  [self->appointment release];
-  [self->currentDay release];
-  [self->aptFormatter release];
+  [self->appointments        release];
+  [self->allDayApts          release];
+  [self->appointment         release];
+  [self->currentDay          release];
+  [self->aptFormatter        release];
   [self->aptTooltipFormatter release];
   [super dealloc];
 }
@@ -50,38 +50,37 @@ static BOOL shouldDisplayWeekend = NO;
 }
 
 - (NSDictionary *)aptTypeDict {
-    return nil;
+  return nil;
 }
-
 - (NSString *)aptTypeLabel {
-    return @"aptLabel";
+  return @"aptLabel";
 }
-
 - (NSString *)aptTypeIcon {
-    return @"";
+  return @"";
 }
 
 - (SOGoAptFormatter *)aptFormatter {
-    if(self->aptFormatter)
-        return self->aptFormatter;
-    self->aptFormatter = [[SOGoAptFormatter alloc]
-                         initWithDisplayTimeZone:[self viewTimeZone]];
-    [self->aptFormatter setFullDetails];
+  if (self->aptFormatter)
     return self->aptFormatter;
+  
+  self->aptFormatter = [[SOGoAptFormatter alloc]
+                         initWithDisplayTimeZone:[self viewTimeZone]];
+  [self->aptFormatter setFullDetails];
+  return self->aptFormatter;
 }
 
 - (SOGoAptFormatter *)aptTooltipFormatter {
-    if(self->aptTooltipFormatter)
-        return self->aptTooltipFormatter;
-    self->aptTooltipFormatter = [[SOGoAptFormatter alloc]
-                                initWithDisplayTimeZone:[self viewTimeZone]];
-    [self->aptTooltipFormatter setTooltip];
+  if (self->aptTooltipFormatter)
     return self->aptTooltipFormatter;
+  self->aptTooltipFormatter = [[SOGoAptFormatter alloc]
+                                initWithDisplayTimeZone:[self viewTimeZone]];
+  [self->aptTooltipFormatter setTooltip];
+  return self->aptTooltipFormatter;
 }
 
 /* TODO: remove this */
 - (NSString *)shortTextForApt {
-    return [[self aptFormatter] stringForObjectValue:self->appointment];
+  return [[self aptFormatter] stringForObjectValue:self->appointment];
 }
 
 - (NSString *)shortTitleForApt {
@@ -95,24 +94,24 @@ static BOOL shouldDisplayWeekend = NO;
 }
 
 - (NSString *)tooltipForApt {
-    return [[self aptTooltipFormatter] stringForObjectValue:self->appointment];
+  return [[self aptTooltipFormatter] stringForObjectValue:self->appointment];
 }
 
 - (BOOL)isMyApt {
-    NSString *mailtoChunk;
-    NSString *myEmail;
+  NSString *mailtoChunk;
+  NSString *myEmail;
 
-    mailtoChunk = [self->appointment valueForKey:@"partmails"];
-    myEmail = [self emailForUser];
-    if([mailtoChunk rangeOfString:myEmail].length > 0)
-        return YES;
-    return NO;
+  mailtoChunk = [self->appointment valueForKey:@"partmails"];
+  myEmail = [self emailForUser];
+  if ([mailtoChunk rangeOfString:myEmail].length > 0)
+    return YES;
+  return NO;
 }
 
 - (NSString *)aptStyle {
-    if(![self isMyApt])
-        return @"apt_other";
-    return nil;
+  if (![self isMyApt])
+    return @"apt_other";
+  return nil;
 }
 
 - (NSCalendarDate *)referenceDateForFormatter {
@@ -120,13 +119,14 @@ static BOOL shouldDisplayWeekend = NO;
 }
 
 - (NSCalendarDate *)thisMonth {
-    return [self selectedDate];
+  return [self selectedDate];
 }
 
 - (NSCalendarDate *)nextMonth {
-    NSCalendarDate *date = [self thisMonth];
-    return [date dateByAddingYears:0 months:0 days:[date numberOfDaysInMonth]
-                             hours:0 minutes:0 seconds:0];
+  NSCalendarDate *date = [self thisMonth];
+  
+  return [date dateByAddingYears:0 months:0 days:[date numberOfDaysInMonth]
+              hours:0 minutes:0 seconds:0];
 }
 
 
@@ -145,50 +145,49 @@ static BOOL shouldDisplayWeekend = NO;
 }
 
 - (id)holidayInfo {
-    return nil;
+  return nil;
 }
 
 - (NSArray *)allDayApts {
-    NSArray *apts;
-    NSMutableArray *filtered;
-    unsigned i, count;
+  NSArray        *apts;
+  NSMutableArray *filtered;
+  unsigned i, count;
 
-    if(self->allDayApts)
-        return self->allDayApts;
+  if (self->allDayApts)
+    return self->allDayApts;
 
-    apts = [self appointments];
-    count = [apts count];
-    filtered = [[NSMutableArray alloc] initWithCapacity:3];
-    for(i = 0; i < count; i++) {
-        id apt;
-        NSNumber *bv;
+  apts     = [self appointments];
+  count    = [apts count];
+  filtered = [[NSMutableArray alloc] initWithCapacity:3];
+  for (i = 0; i < count; i++) {
+    id apt;
+    NSNumber *bv;
 
-        apt = [apts objectAtIndex:i];
+    apt = [apts objectAtIndex:i];
 #warning !! check if isAllDay is correct
-        bv = [apt valueForKey:@"isAllDay"];
-        if([bv boolValue]) {
-            [filtered addObject:apt];
-        }
-    }
+    bv = [apt valueForKey:@"isAllDay"];
+    if ([bv boolValue])
+      [filtered addObject:apt];
+  }
     
-    ASSIGN(self->allDayApts, filtered);
-    [filtered release];
-    return self->allDayApts;
+  ASSIGN(self->allDayApts, filtered);
+  [filtered release];
+  return self->allDayApts;
 }
 
 
 /* special appointments */
 
 - (BOOL)hasDayInfo {
-    return [self hasHoldidayInfo] || [self hasAllDayApts];
+  return [self hasHoldidayInfo] || [self hasAllDayApts];
 }
 
 - (BOOL)hasHoldidayInfo {
-    return [self holidayInfo] != nil;
+  return [self holidayInfo] != nil;
 }
 
 - (BOOL)hasAllDayApts {
-    return [[self allDayApts] count] != 0;
+  return [[self allDayApts] count] != 0;
 }
 
 
@@ -215,7 +214,7 @@ static BOOL shouldDisplayWeekend = NO;
 }
 
 - (BOOL)shouldHideWeekend {
-    return ![self shouldDisplayWeekend];
+  return ![self shouldDisplayWeekend];
 }
 
 
@@ -238,6 +237,7 @@ static BOOL shouldDisplayWeekend = NO;
 
 - (NSString *)resourcePath {
   // TODO: broken
+  // TODO: where is this used?
   return @"/sogod.woa/WebServerResources/";
 }