From 5a7fb00743fc7b88826b41ba5fb7cf92deeee056 Mon Sep 17 00:00:00 2001 From: wolfgang Date: Fri, 28 Mar 2008 18:20:41 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1394 d1b88da0-ebda-0310-925b-ed51d893ca5b --- ChangeLog | 3 ++ NEWS | 1 + SoObjects/Contacts/SOGoContactLDIFEntry.m | 5 +++ SoObjects/Mailer/SOGoDraftObject.m | 26 ++++++++------ UI/MailerUI/UIxMailEditor.m | 14 +++----- UI/Scheduler/French.lproj/Localizable.strings | 2 +- UI/WebServerResources/ContactsUI.js | 36 ++++++++++--------- UI/WebServerResources/SchedulerUI.js | 6 +++- 8 files changed, 54 insertions(+), 39 deletions(-) diff --git a/ChangeLog b/ChangeLog index d960475d..472cfde0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-03-28 Wolfgang Sourdeau + * SoObjects/Contacts/SOGoContactLDIFEntry.m ([SOGoContactLDIFEntry + -isFolderish]): new overriden method. + * SoObjects/Appointments/SOGoAppointmentFolder.m ([SOGoAppointmentFolder -appendObject:objectproperties:propertieswithBaseURL:baseURLtoComplexResponse:r]): diff --git a/NEWS b/NEWS index 63ed59f2..7a166c11 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ 0.9.0-2008xxxx (1.0 rc6) +------------------------ - retrieving the freebusy DAV object was causing SOGo to crash - converted to use the gnustep-make 2 build framework - added custom DAV methods for managing user permissions from the SOGo Integrator diff --git a/SoObjects/Contacts/SOGoContactLDIFEntry.m b/SoObjects/Contacts/SOGoContactLDIFEntry.m index 94615aba..6caa7ca1 100644 --- a/SoObjects/Contacts/SOGoContactLDIFEntry.m +++ b/SoObjects/Contacts/SOGoContactLDIFEntry.m @@ -171,6 +171,11 @@ return vcard; } +- (BOOL) isFolderish +{ + return NO; +} + - (NSString *) davEntityTag { unsigned int hash; diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m index 2e210e01..ae5e8137 100644 --- a/SoObjects/Mailer/SOGoDraftObject.m +++ b/SoObjects/Mailer/SOGoDraftObject.m @@ -713,21 +713,25 @@ static BOOL showTextAttachmentsInline = NO; return ma; } -- (BOOL) isValidAttachmentName: (NSString *) _name +- (BOOL) isValidAttachmentName: (NSString *) filename { static NSString *sescape[] = { @"/", @"..", @"~", @"\"", @"'", nil }; - unsigned i; + unsigned int i; NSRange r; + BOOL result; - if (![_name isNotNull]) return NO; - if ([_name length] == 0) return NO; - if ([_name hasPrefix: @"."]) return NO; - - for (i = 0; sescape[i] != nil; i++) { - r = [_name rangeOfString:sescape[i]]; - if (r.length > 0) return NO; - } - return YES; + result = ([filename length] && ![filename hasPrefix: @"."]); + i = 0; + while (result && sescape[i]) + { + r = [filename rangeOfString: sescape[i]]; + if (r.length > 0) + result = NO; + else + i++; + } + + return result; } - (NSString *) pathToAttachmentWithName: (NSString *) _name diff --git a/UI/MailerUI/UIxMailEditor.m b/UI/MailerUI/UIxMailEditor.m index fd45643c..18e2bd8a 100644 --- a/UI/MailerUI/UIxMailEditor.m +++ b/UI/MailerUI/UIxMailEditor.m @@ -337,15 +337,11 @@ static NSArray *infoKeys = nil; co = [self clientObject]; allKeys = [[request formValueKeys] objectEnumerator]; - key = [allKeys nextObject]; - while (key && success) - { - if ([key hasPrefix: @"attachment"]) - success - = (![co saveAttachment: (NSData *) [request formValueForKey: key] - withMetadata: [filenames objectForKey: key]]); - key = [allKeys nextObject]; - } + while ((key = [allKeys nextObject]) && success) + if ([key hasPrefix: @"attachment"]) + success + = (![co saveAttachment: (NSData *) [request formValueForKey: key] + withMetadata: [filenames objectForKey: key]]); return success; } diff --git a/UI/Scheduler/French.lproj/Localizable.strings b/UI/Scheduler/French.lproj/Localizable.strings index e6ebaac8..1d7967c0 100644 --- a/UI/Scheduler/French.lproj/Localizable.strings +++ b/UI/Scheduler/French.lproj/Localizable.strings @@ -245,7 +245,7 @@ "Browse URL" = "Visiter l'URL"; -"newAttendee" = "Nouvel invité"; +"newAttendee" = "Ajouter un participant"; /* calendar modes */ diff --git a/UI/WebServerResources/ContactsUI.js b/UI/WebServerResources/ContactsUI.js index 4879afa2..b139ee3a 100644 --- a/UI/WebServerResources/ContactsUI.js +++ b/UI/WebServerResources/ContactsUI.js @@ -510,11 +510,11 @@ function onConfirmContactSelection(event) { var initialValues = null; if (selector) { - var selectorId = selector.getAttribute("id"); - selectorList = opener.window.document.getElementById('uixselector-' - + selectorId - + '-uidList'); - initialValues = selectorList.value; + var selectorId = selector.getAttribute("id"); + selectorList = opener.window.document.getElementById('uixselector-' + + selectorId + + '-uidList'); + initialValues = selectorList.value; } var contactsList = $("contactsList"); @@ -718,10 +718,12 @@ function deniedFoldersLookupCallback(http) { function configureAbToolbar() { var toolbar = $("abToolbar"); - var links = toolbar.childNodesWithTag("a"); - Event.observe(links[0], "click", onAddressBookNew, false); - Event.observe(links[1], "click", onAddressBookAdd, false); - Event.observe(links[2], "click", onAddressBookRemove, false); + if (toolbar) { + var links = toolbar.childNodesWithTag("a"); + $(links[0]).observe("click", onAddressBookNew); + $(links[1]).observe("click", onAddressBookAdd); + $(links[2]).observe("click", onAddressBookRemove); + } } function configureContactFolders() { @@ -858,18 +860,18 @@ function getMenus() { } function configureSelectionButtons() { - var container = $("contactSelectionButtons"); - if (container) { - var buttons = container.childNodesWithTag("input"); - for (var i = 0; i < buttons.length; i++) - Event.observe(buttons[i], "click", - onConfirmContactSelection.bindAsEventListener(buttons[i])); - } + var container = $("contactSelectionButtons"); + if (container) { + var buttons = container.childNodesWithTag("input"); + for (var i = 0; i < buttons.length; i++) + $(buttons[i]).observe("click", + onConfirmContactSelection); + } } function initContacts(event) { if (document.body.hasClassName("popup")) - configureSelectionButtons(); + configureSelectionButtons(); configureAbToolbar(); configureContactFolders(); // initDnd(); diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index ea68fdf8..e2f1f341 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -766,7 +766,11 @@ function refreshCalendarEventsCallback(http) { dateTuples[j][c.start] < dateTuples[i][c.end] || dateTuples[j][c.start] == dateTuples[i][c.start] && - dateTuples[j][c.end] < dateTuples[i][c.end] ){ + dateTuples[j][c.end] < dateTuples[i][c.end] || + + dateTuples[j][c.start] == dateTuples[i][c.start] && + dateTuples[j][c.end] == dateTuples[i][c.end] && + i < j) { // Same period if (dateTuples[j][c.siblingsCount] > maxCount) maxCount = dateTuples[j][c.siblingsCount]; -- 2.39.5