From: helge Date: Thu, 4 Aug 2005 21:19:42 +0000 (+0000) Subject: code cleanups X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9fa3200b0adf43f594332dcf2bbac322e914381;p=sope code cleanups git-svn-id: http://svn.opengroupware.org/SOPE/trunk@972 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index 86d48a4a..471dec46 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -1,3 +1,7 @@ +2005-08-04 Helge Hess + + * minor code cleanups (v4.5.182) + 2005-08-03 Helge Hess * WODisplayGroup.m: detect whether an EOEditingContext is available at diff --git a/sope-appserver/NGObjWeb/Version b/sope-appserver/NGObjWeb/Version index 818fe82b..b14095bc 100644 --- a/sope-appserver/NGObjWeb/Version +++ b/sope-appserver/NGObjWeb/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=181 +SUBMINOR_VERSION:=182 # v4.5.122 requires libNGExtensions v4.5.153 # v4.5.91 requires libNGExtensions v4.5.134 diff --git a/sope-appserver/NGObjWeb/WOComponent.m b/sope-appserver/NGObjWeb/WOComponent.m index 97a4370b..39a115f7 100644 --- a/sope-appserver/NGObjWeb/WOComponent.m +++ b/sope-appserver/NGObjWeb/WOComponent.m @@ -1176,6 +1176,14 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) { - (id)unarchiver:(EOKeyValueUnarchiver *)_archiver objectForReference:(id)_keyPath { + /* + This is used when a .woo file is unarchived. Eg datasources contain + bindings in the archive: + + editingContext = session.defaultEditingContext; + + The binding will evaluate against the component during loading. + */ return [self valueForKeyPath:_keyPath]; } diff --git a/sope-appserver/NGObjWeb/WOComponentDefinition.m b/sope-appserver/NGObjWeb/WOComponentDefinition.m index 07b9bc47..6e109242 100644 --- a/sope-appserver/NGObjWeb/WOComponentDefinition.m +++ b/sope-appserver/NGObjWeb/WOComponentDefinition.m @@ -362,7 +362,7 @@ static NSArray *woxExtensions = nil; [unarchiver setDelegate:_component]; keys = [_vars keyEnumerator]; - while ((key = [keys nextObject])) { + while ((key = [keys nextObject]) != nil) { id object; object = [unarchiver decodeObjectForKey:key]; diff --git a/sope-appserver/NGObjWeb/WOServerSessionStore.m b/sope-appserver/NGObjWeb/WOServerSessionStore.m index 96647e8b..e036154f 100644 --- a/sope-appserver/NGObjWeb/WOServerSessionStore.m +++ b/sope-appserver/NGObjWeb/WOServerSessionStore.m @@ -247,16 +247,16 @@ static BOOL logExpiredSessions = NO; for (cnt = 0, count = [timedOut count]; cnt < count; cnt++) { NSString *sid; - info = [timedOut objectAtIndex:cnt]; - sid = [[info sessionID] copy]; + info = [timedOut objectAtIndex:cnt]; + sid = [[info sessionID] copy]; - NSMapRemove(self->activeSessions, sid); - NSMapRemove(self->idToSession, sid); + NSMapRemove(self->activeSessions, sid); + NSMapRemove(self->idToSession, sid); - [nc postNotificationName:WOSessionDidTimeOutNotification - object:sid]; - - [sid release]; + [nc postNotificationName:WOSessionDidTimeOutNotification + object:sid]; + + [sid release]; } } diff --git a/sope-appserver/samples/CoreDataBlog/GNUmakefile.preamble b/sope-appserver/samples/CoreDataBlog/GNUmakefile.preamble index 744528b7..d7659563 100644 --- a/sope-appserver/samples/CoreDataBlog/GNUmakefile.preamble +++ b/sope-appserver/samples/CoreDataBlog/GNUmakefile.preamble @@ -17,7 +17,8 @@ ADDITIONAL_LDFLAGS += \ -framework CoreServices ADDITIONAL_TOOL_LIBS += \ - -lEOControl \ + -lEOCoreData \ + -lEOControl \ -lDOM -lXmlRpc -lSaxObjC ADDITIONAL_LIB_DIRS += -L/usr/local/lib -L/usr/lib