]> err.no Git - sope/commitdiff
added Google as a known user agent
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 2 Aug 2005 09:46:31 +0000 (09:46 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 2 Aug 2005 09:46:31 +0000 (09:46 +0000)
minor code cleanups

git-svn-id: http://svn.opengroupware.org/SOPE/trunk@958 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-appserver/NGObjWeb/ChangeLog
sope-appserver/NGObjWeb/SoObjects/SoProductClassInfo.m
sope-appserver/NGObjWeb/SoObjects/SoProductResourceManager.m
sope-appserver/NGObjWeb/Version
sope-appserver/NGObjWeb/WEClientCapabilities.m
sope-appserver/NGObjWeb/WOResourceManager.m
sope-appserver/WEExtensions/WEResourceManager.m

index 49528f746b366b000e63885fc98b7292b55f3a98..ed60d7ea869fb7fab8f177ee49c9fd9a5e445733 100644 (file)
@@ -1,3 +1,14 @@
+2005-08-02  Helge Hess  <helge.hess@skyrix.com>
+
+       * v4.5.180
+
+       * WEClientCapabilities.m: added Google as a known user-agent
+
+       * WOResourceManager.m, SoObjects/SoProductClassInfo.m: minor code
+         cleanup
+
+       * SoObjects/SoProductResourceManager.m: improved an error log
+
 2005-07-23  Sebastian Reitenbach  <reitenbach@rapideye.de>
 
        * GNUmakefile.preamble: added OpenBSD linking flags (v4.5.179)
index d72ced189744595df76310dbe37ddbb4938c8229..9b014f989bb10feed84683cf5e53d8cea51a7718 100644 (file)
@@ -110,15 +110,15 @@ static int loadDebugOn = 0;
       [_security declareObjectProtected:self->protectedBy];
   }
   
-  if (self->defaultAccess)
+  if (self->defaultAccess != nil)
     [_security setDefaultAccess:self->defaultAccess];
   
-  if (self->roleInfo) {
+  if (self->roleInfo != nil) {
     NSEnumerator *perms;
     NSString *perm;
     
     perms = [self->roleInfo keyEnumerator];
-    while ((perm = [perms nextObject])) {
+    while ((perm = [perms nextObject]) != nil) {
       NSString *role = [self->roleInfo objectForKey:perm];
       
       [_security declareRole:role asDefaultForPermission:perm];
index 3ac49bf9900e09c6bf54fad9f78de8df98947ed0..45e7ed4a5c4c2949ed942f285c5a58f9e6330fc6 100644 (file)
@@ -323,7 +323,8 @@ static BOOL debugOn = NO;
     p = [[self fallbackResourceManager] pathToComponentNamed:_name
                                        inFramework:_fwname
                                        languages:_langs];
-    [self logWithFormat:@"  PARENT SAID: %@", p];
+    [self logWithFormat:@"  PARENT (%@) SAID: %@", 
+            [self fallbackResourceManager], p];
   }
   return p;
 }
index 9cc49c9947acb612b14dd53642f040f5524d33ed..5546ff2e4722eae75fce80fe9286d774d3fe72de 100644 (file)
@@ -1,6 +1,6 @@
 # version file
 
-SUBMINOR_VERSION:=179
+SUBMINOR_VERSION:=180
 
 # v4.5.122 requires libNGExtensions v4.5.153
 # v4.5.91  requires libNGExtensions v4.5.134
index 15ed9098e6d5911e3cf4a6186e8944b7e5809fc1..a17f44ca8bad2ea2f73c4802ce8a6a2b69131a38 100644 (file)
@@ -69,6 +69,7 @@
 #define WEUA_NewsFire         39
 #define WEUA_Goliath          40
 #define WEUA_PerlHTTPDAV      41
+#define WEUA_Google           42
 
 #define WEOS_UNKNOWN   0
 #define WEOS_WINDOWS   1
   else if (strstr(ua, "SOPE/")) {
     self->browser = WEUA_SOPE;
   }
+  else if (strstr(ua, "Mediapartners-Google/")) {
+    self->browser = WEUA_Google;
+  }
   else {
     /* unknown browser */
     self->browser = WEUA_UNKNOWN;
     case WEUA_NewsFire:         return @"NewsFire";
     case WEUA_Goliath:          return @"Goliath";
     case WEUA_PerlHTTPDAV:      return @"PerlHTTPDAV";
+    case WEUA_Google:           return @"Google";
     default:                    return @"unknown";
   }
 }
   if (self->browser == WEUA_Wget)         return YES;
   if (self->browser == WEUA_JavaSDK)      return YES;
   if (self->browser == WEUA_PythonURLLIB) return YES;
+  if (self->browser == WEUA_Google)       return YES;
   return NO;
 }
 - (BOOL)isDAVClient {
@@ -1048,4 +1054,7 @@ static NSString *WEClientDetectorFormName = @"WEClientDetect";
 
   PERL HTTP::DAV
     'DAV.pm/v0.31'
+  
+  Google Ads
+    'Mediapartners-Google/2.1'
 */
index f6a8bc0d2c06e133a60603ec3b943e29891a79d4..ec67480a78eeb678cc82d12bdbeed2d99d652542 100644 (file)
@@ -1097,19 +1097,6 @@ _pathExists(WOResourceManager *self, NSFileManager *fm, NSString *path)
   return [component autorelease];
 }
 
-/* description */
-
-- (NSString *)description {
-  NSMutableString *ms;
-
-  ms = [NSMutableString stringWithCapacity:32];
-  [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
-  if ([self->base length] > 0)
-    [ms appendFormat:@" path='%@'", self->base];
-  [ms appendString:@">"];
-  return ms;
-}
-
 /* KeyedData */
 
 - (void)setData:(NSData *)_data
@@ -1178,4 +1165,17 @@ _pathExists(WOResourceManager *self, NSFileManager *fm, NSString *path)
   [self unlock];
 }
 
+/* description */
+
+- (NSString *)description {
+  NSMutableString *ms;
+
+  ms = [NSMutableString stringWithCapacity:32];
+  [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+  if ([self->base length] > 0)
+    [ms appendFormat:@" path='%@'", self->base];
+  [ms appendString:@">"];
+  return ms;
+}
+
 @end /* WOResourceManager */
index d5f7ea3eb3e6a94f75a62c9abb889152354ef217..9e0e99003da8908bff49cc3bda5236b20b07d245 100644 (file)
@@ -84,6 +84,7 @@ static NSString *themesDirName = @"Themes";
 + (NSArray *)findResourceDirectoryPathesWithName:(NSString *)_name
   fhsName:(NSString *)_fhs
 {
+  /* find directories which might contain resources */
   NSEnumerator   *e;
   NSFileManager  *fm;
   NSMutableArray *ma;
@@ -117,6 +118,7 @@ static NSString *themesDirName = @"Themes";
     tmp = [tmp stringByAppendingString:[[self class] shareSubpath]];
     tmp = [tmp stringByAppendingString:_fhs];
     if ([ma containsObject:tmp]) continue;
+    if (debugOn) [self logWithFormat:@"CHECK: %@", tmp];
     
     if (![fm fileExistsAtPath:tmp isDirectory:&isDir])
       continue;