]> err.no Git - sope/commitdiff
minor code cleanups
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 24 Jul 2006 18:19:48 +0000 (18:19 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 24 Jul 2006 18:19:48 +0000 (18:19 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1326 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-appserver/WEExtensions/ChangeLog
sope-appserver/WEExtensions/Version
sope-appserver/WEExtensions/WEWeekOverview.m

index fd094e288b0d8bacd3719d22bb33c01bfc6a4af3..04bed36ab4243d8123aaa1fccf3325093624cc41 100644 (file)
@@ -1,3 +1,7 @@
+2006-07-24  Helge Hess  <helge.hess@opengroupware.org>
+
+       * WEWeekOverview.m: use -warnWithFormat:, minor code cleanups (v4.5.88)
+
 2006-07-05  Helge Hess  <helge.hess@opengroupware.org>
 
        * WEResourceManager.m: added FHS_INSTALL_ROOT to lookup path (v4.5.87)
index 7a6e3ea8a02436281c201ff9b2d917822e4ac39f..b015e49bed52a9385c919252ba2b71212283d7a7 100644 (file)
@@ -1,6 +1,6 @@
 # version file
 
-SUBMINOR_VERSION:=87
+SUBMINOR_VERSION:=88
 
 # v4.5.76 requires libNGObjWeb v4.5.176
 # v4.5.75 requires libNGObjWeb v4.5.174
index dcf3836662d99c092f720a42d1658cf624a49487..32e7dbcdd82bef19767735927f351f9ff32f3a6a 100644 (file)
@@ -378,6 +378,7 @@ _applyIndex(WEWeekOverview *self, WOComponent *comp, unsigned _idx)
 }
 
 - (void)_calcMatrixInContext:(WOContext *)_ctx {
+  // THREAD: uses temporary ivars
   WOComponent    *comp;
   NSCalendarDate *startWeek;
   NSCalendarDate *endWeek;
@@ -430,11 +431,12 @@ _applyIndex(WEWeekOverview *self, WOComponent *comp, unsigned _idx)
 
     idx = floor((diff / SecondsPerWeek) * 14);
 
-    if ((self->item) && (self->isInfoItem)) {
+    if ((self->item != nil) && (self->isInfoItem)) {
       [self->item setValue:app inComponent:comp];
       isInfo = [[self->isInfoItem valueInComponent:comp] boolValue];
     }
-    else isInfo = NO;
+    else 
+      isInfo = NO;
     
     if ((0 <= idx) && (idx < 14)) {      
       if (isInfo) {
@@ -960,6 +962,7 @@ _applyIndex(WEWeekOverview *self, WOComponent *comp, unsigned _idx)
   /* P.M.Infos */
   [self takeValues:_req mode:WEWeekOverview_PMInfoMode modeId:@"p" ctx:_ctx];
 
+  // THREAD: uses temporary ivars
   [self _calcMatrixInContext:_ctx];
 
   [_ctx setObject:@"YES" forKey:WEWeekOverview_ContentMode];
@@ -1120,7 +1123,7 @@ _applyIndex(WEWeekOverview *self, WOComponent *comp, unsigned _idx)
     headers = [self->headerRows valueInComponent:comp];
     idx     = [sectionId intValue];
     if (idx >= (int)[headers count]) {
-      NSLog(@"WARNING! WEWeekOverview: wrong headerrow index");
+      [self warnWithFormat:@"WEWeekOverview: wrong headerrow index"];
     }
     else {
       result = [self invokeActionForHeader:_req
@@ -1135,7 +1138,7 @@ _applyIndex(WEWeekOverview *self, WOComponent *comp, unsigned _idx)
     footers = [self->footerRows valueInComponent:comp];
     idx     = [sectionId intValue];
     if (idx >= (int)[footers count]) {
-      NSLog(@"WARNING! WEWeekOverview: wrong footerrow index");
+      [self warnWithFormat:@"WEWeekOverview: wrong footerrow index"];
     }
     else {
       result = [self invokeActionForFooter:_req
@@ -1175,7 +1178,8 @@ _applyIndex(WEWeekOverview *self, WOComponent *comp, unsigned _idx)
   showWeekend = (self->hideWeekend != nil)
     ? [self->hideWeekend boolValueInComponent:comp] ? NO : YES
     : YES;
-  
+
+  // TODO: use CSS over here
   [_response appendContentString:
              @"<table border=\""];
   [_response appendContentString:b];  // border
@@ -1198,7 +1202,7 @@ _applyIndex(WEWeekOverview *self, WOComponent *comp, unsigned _idx)
 
   /*** append AM content row + saturday ***/
   [_response appendContentString:@"<tr>"];
-
+  
   /* AM weekdays content (this is count=10 because we slot 0=AM/1=PM, etc) */
   for (i = 0; i < 10; i = i + 2) {
     if ([self->dayIndex isValueSettable])