From: helge Date: Sun, 12 Mar 2006 20:51:27 +0000 (+0000) Subject: code cleanups X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d996fa8d5556c3551ae74f1db34ec641ad3746d;p=sope code cleanups git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1226 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-appserver/WEExtensions/ChangeLog b/sope-appserver/WEExtensions/ChangeLog index fe23db1c..537790e2 100644 --- a/sope-appserver/WEExtensions/ChangeLog +++ b/sope-appserver/WEExtensions/ChangeLog @@ -1,3 +1,8 @@ +2006-03-12 Helge Hess + + * WEResourceManager.m: minor code cleanups, log the flat template + subpath if it could not be found (v4.5.85) + 2005-11-17 Helge Hess * v4.5.84 diff --git a/sope-appserver/WEExtensions/Version b/sope-appserver/WEExtensions/Version index 1a557b95..f88a1372 100644 --- a/sope-appserver/WEExtensions/Version +++ b/sope-appserver/WEExtensions/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=84 +SUBMINOR_VERSION:=85 # v4.5.76 requires libNGObjWeb v4.5.176 # v4.5.75 requires libNGObjWeb v4.5.174 diff --git a/sope-appserver/WEExtensions/WEResourceManager.m b/sope-appserver/WEExtensions/WEResourceManager.m index 9e0e9900..54afa723 100644 --- a/sope-appserver/WEExtensions/WEResourceManager.m +++ b/sope-appserver/WEExtensions/WEResourceManager.m @@ -170,8 +170,10 @@ static NSString *themesDirName = @"Themes"; fhsName:@"templates/"] copy]; if (debugOn) NSLog(@"template pathes: %@", templatePathes); - if ([templatePathes count] == 0) - NSLog(@"Note: found no directories containing flat templates."); + if (![templatePathes isNotEmpty]) { + NSLog(@"Note: found no directories containing flat templates (subpath=%@)", + [[self class] gsTemplatesSubpath]); + } } + (NSArray *)availableThemes { @@ -203,7 +205,7 @@ static NSString *themesDirName = @"Themes"; lthemes = [[[themes allObjects] sortedArrayUsingSelector:@selector(compare:)] copy]; - if ([lthemes count] > 0) { + if ([lthemes isNotEmpty]) { NSLog(@"Note: located themes: %@", [lthemes componentsJoinedByString:@", "]); } @@ -213,7 +215,7 @@ static NSString *themesDirName = @"Themes"; } - (id)initWithPath:(NSString *)_path { - if ((self = [super initWithPath:_path])) { + if ((self = [super initWithPath:_path]) != nil) { if ([WOApplication isCachingEnabled]) { self->keyToComponentPath = [[NSMutableDictionary alloc] initWithCapacity:128];