From cff393e1eed44bf768d8dcfe797de150f42496f6 Mon Sep 17 00:00:00 2001 From: helge Date: Sun, 19 Nov 2006 12:30:59 +0000 Subject: [PATCH] allow kvc pathes in rule values fixed some quote parsing issue git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1381 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-core/NGExtensions/ChangeLog | 9 +++++++++ sope-core/NGExtensions/FdExt.subproj/NSString+misc.m | 8 ++++++-- .../NGExtensions/NGRuleEngine.subproj/NGRuleContext.m | 5 +++-- sope-core/NGExtensions/Version | 2 +- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/sope-core/NGExtensions/ChangeLog b/sope-core/NGExtensions/ChangeLog index 216f535e..9a29b3c4 100644 --- a/sope-core/NGExtensions/ChangeLog +++ b/sope-core/NGExtensions/ChangeLog @@ -1,3 +1,12 @@ +2006-11-19 Helge Hess + + * v4.5.191 + + * NGRuleEngine.subproj/NGRuleContext.m: allow keypathes in rule values, + not just keys + + * FdExt.subproj/NSString+misc.m: fixed a quote-skipping issue + 2006-11-16 Helge Hess * EOExt.subproj/EOCacheDataSource.m: the NSTimer of the datasource diff --git a/sope-core/NGExtensions/FdExt.subproj/NSString+misc.m b/sope-core/NGExtensions/FdExt.subproj/NSString+misc.m index fcdb4faa..f7a6ffa7 100644 --- a/sope-core/NGExtensions/FdExt.subproj/NSString+misc.m +++ b/sope-core/NGExtensions/FdExt.subproj/NSString+misc.m @@ -1,5 +1,6 @@ /* - Copyright (C) 2000-2005 SKYRIX Software AG + Copyright (C) 2000-2006 SKYRIX Software AG + Copyright (C) 2006 Helge Hess This file is part of SOPE. @@ -262,7 +263,10 @@ } else if ([quotes characterIsMember:c]) { /* skip quotes */ - for (i++; i < len && ![quotes characterIsMember:c]; i++) { + i++; + c = [self characterAtIndex:i]; + for (; i < len && ![quotes characterIsMember:c]; i++) { + c = [self characterAtIndex:i]; if (c == _escape) { i++; /* skip next char (eg \') */ continue; diff --git a/sope-core/NGExtensions/NGRuleEngine.subproj/NGRuleContext.m b/sope-core/NGExtensions/NGRuleEngine.subproj/NGRuleContext.m index 7e38945d..c3ef5fcc 100644 --- a/sope-core/NGExtensions/NGRuleEngine.subproj/NGRuleContext.m +++ b/sope-core/NGExtensions/NGRuleEngine.subproj/NGRuleContext.m @@ -1,5 +1,6 @@ /* - Copyright (C) 2003-2004 SKYRIX Software AG + Copyright (C) 2003-2006 SKYRIX Software AG + Copyright (C) 2006 Helge Hess This file is part of SOPE. @@ -187,7 +188,7 @@ [self takeValue:[_values objectAtIndex:i] forKeyPath:_valkp]; /* calculate the rule value */ - ruleValue = [self valueForKey:_kp]; + ruleValue = [self valueForKeyPath:_kp]; [results addObject:(ruleValue != nil ? ruleValue : (id)[NSNull null])]; } return results; diff --git a/sope-core/NGExtensions/Version b/sope-core/NGExtensions/Version index e3c6c10c..25359895 100644 --- a/sope-core/NGExtensions/Version +++ b/sope-core/NGExtensions/Version @@ -1,6 +1,6 @@ # version -SUBMINOR_VERSION:=190 +SUBMINOR_VERSION:=191 # v4.3.115 requires libFoundation v1.0.59 # v4.2.72 requires libEOControl v4.2.39 -- 2.39.5