From a59620a53dab939b9cc6f89a2bd182621dadfe45 Mon Sep 17 00:00:00 2001 From: wolfgang Date: Wed, 16 Jan 2008 22:05:52 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1318 d1b88da0-ebda-0310-925b-ed51d893ca5b --- ChangeLog | 4 +++ NEWS | 5 ++++ SOPE/GDLContentStore/ChangeLog | 4 +++ SOPE/GDLContentStore/GCSFolderManager.m | 40 +++++++++++++++---------- UI/WebServerResources/generic.js | 7 ++++- 5 files changed, 43 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 09f2ec57..3b2992c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-01-16 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoCache.m ([SOGoCache + -registerObject:objectwithName:nameinContainer:container]): + register the object and its parents too. + * SoObjects/SOGo/SOGoUser.m ([SOGoUser +userWithLogin:newLoginroles:newRoles]): try to retrieve the specified user from the SOGoCache. diff --git a/NEWS b/NEWS index da541417..ad2a2597 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,11 @@ 0.9.0-2008MMDD (1.0 rc4) ------------------------ - improved the attendees window; +- added the attendees pulldown menu in the event editor (like in Lightning); +- added the recurrence window; +- a message can be composed to multiple recipients from an address book or + from an event attendees menu; +- many bugfixes in the Calendar module; 0.9.0-20071217 (1.0 rc3) ------------------------ diff --git a/SOPE/GDLContentStore/ChangeLog b/SOPE/GDLContentStore/ChangeLog index eff43347..e3f93815 100644 --- a/SOPE/GDLContentStore/ChangeLog +++ b/SOPE/GDLContentStore/ChangeLog @@ -1,5 +1,9 @@ 2008-01-16 Wolfgang Sourdeau + * GCSFolderManager.m ([GCSFolderManager -baseTableNameWithUID:]): + generate an id that is guaranteed to be unique in more than + 1000000 cases (from unit testing). + * GCSFolder.m: fetch the content, version and dates at the same time per record, to avoid multiple queries. diff --git a/SOPE/GDLContentStore/GCSFolderManager.m b/SOPE/GDLContentStore/GCSFolderManager.m index b664d54e..438145a7 100644 --- a/SOPE/GDLContentStore/GCSFolderManager.m +++ b/SOPE/GDLContentStore/GCSFolderManager.m @@ -19,16 +19,18 @@ 02111-1307, USA. */ -#include "GCSFolderManager.h" -#include "GCSChannelManager.h" -#include "GCSFolderType.h" -#include "GCSFolder.h" -#include "NSURL+GCS.h" -#include "EOAdaptorChannel+GCS.h" -#include "common.h" -#include -#include -#include +#import + +#import "GCSFolderManager.h" +#import "GCSChannelManager.h" +#import "GCSFolderType.h" +#import "GCSFolder.h" +#import "NSURL+GCS.h" +#import "EOAdaptorChannel+GCS.h" +#import "common.h" +#import +#import +#import /* Required database schema: @@ -49,6 +51,7 @@ static BOOL debugOn = NO; static BOOL debugSQLGen = NO; static BOOL debugPathTraversal = NO; static int quickPathCount = 4; +static int randInc = 0; static NSArray *emptyArray = nil; #if 0 static NSString *GCSPathColumnName = @"c_path"; @@ -60,9 +63,15 @@ static NSString *GCSGenericFolderTypeName = @"Container"; static const char *GCSPathColumnPattern = "c_path%i"; static NSCharacterSet *asciiAlphaNumericCS = nil; -+ (void)initialize { ++ (void) initialize +{ NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; - + int seed; + + seed = ([[NSDate date] timeIntervalSince1970] + + [[NSProcessInfo processInfo] processIdentifier]); + srand (seed); + debugOn = [ud boolForKey:@"GCSFolderManagerDebugEnabled"]; debugSQLGen = [ud boolForKey:@"GCSFolderManagerSQLDebugEnabled"]; emptyArray = [[NSArray alloc] init]; @@ -619,13 +628,11 @@ static NSCharacterSet *asciiAlphaNumericCS = nil; } - (NSString *)baseTableNameWithUID:(NSString *)_uid { - NSDate *now; unichar currentChar; unsigned int count, max, done; NSMutableString *newUID; newUID = [NSMutableString stringWithString: @"sogo"]; - now = [NSDate date]; max = [_uid length]; done = 0; @@ -640,9 +647,10 @@ static NSCharacterSet *asciiAlphaNumericCS = nil; } count++; } + randInc++; - return [NSString stringWithFormat: @"%@%u", - newUID, (unsigned int) [now timeIntervalSince1970]]; + return [NSString stringWithFormat: @"%@%.8x%.8x", + newUID, randInc, (unsigned int) rand()]; } - (NSException *)createFolderOfType:(NSString *)_type diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js index edf3f909..5ad540f1 100644 --- a/UI/WebServerResources/generic.js +++ b/UI/WebServerResources/generic.js @@ -862,7 +862,12 @@ function setSearchCriteria(event) { if (this.parentNode.chosenNode) this.parentNode.chosenNode.removeClassName("_chosen"); this.addClassName("_chosen"); - this.parentNode.chosenNode = this; + + if (this.parentNode.chosenNode != this) { + searchValue.lastSearch = null; + this.parentNode.chosenNode = this; + onSearchFormSubmit(); + } } function checkSearchValue(event) { -- 2.39.5