mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-09-28 00:20:32 +00:00
Merge branch 'master' of https://github.com/inverse-inc/sogo
This commit is contained in:
@@ -9,6 +9,10 @@ Enchancements
|
||||
|
||||
Bug fixes
|
||||
- fixed crasher when subscribing users to resources (#2892)
|
||||
- fixed encoding of new calendars and new subscriptions (JavaScript only)
|
||||
- fixed display of users with no possible subscription
|
||||
- fixed usage of SOGoSubscriptionFolderFormat domain default when the folder's name hasn't been changed
|
||||
- fixed "sogo-tool restore -l" that was returning incorrect folder IDs
|
||||
|
||||
2.2.7 (2014-07-30)
|
||||
------------------
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (C) 2004-2005 SKYRIX Software AG
|
||||
Copyright (C) 2006-2013 Inverse inc.
|
||||
Copyright (C) 2006-2014 Inverse inc.
|
||||
|
||||
This file is part of SOGo.
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
NSString *ocsPath;
|
||||
GCSFolder *ocsFolder;
|
||||
NSMutableDictionary *childRecords;
|
||||
NSMutableDictionary *folderSubscriptionValues;
|
||||
BOOL userCanAccessAllObjects; /* i.e. user obtains 'Access Object' on
|
||||
subobjects */
|
||||
}
|
||||
@@ -102,7 +101,8 @@
|
||||
withReference: (NSString *) reference;
|
||||
|
||||
- (BOOL) subscribeUserOrGroup: (NSString *) theIdentifier
|
||||
reallyDo: (BOOL) reallyDo;
|
||||
reallyDo: (BOOL) reallyDo
|
||||
response: (WOResponse *) theResponse;
|
||||
- (BOOL) userIsSubscriber: (NSString *) subscribingUser;
|
||||
|
||||
- (void) initializeQuickTablesAclsInContext: (WOContext *) localContext;
|
||||
|
||||
@@ -196,7 +196,6 @@ static NSArray *childRecordFields = nil;
|
||||
ocsPath = nil;
|
||||
ocsFolder = nil;
|
||||
childRecords = [NSMutableDictionary new];
|
||||
folderSubscriptionValues = nil;
|
||||
userCanAccessAllObjects = NO;
|
||||
}
|
||||
|
||||
@@ -208,7 +207,6 @@ static NSArray *childRecordFields = nil;
|
||||
[ocsFolder release];
|
||||
[ocsPath release];
|
||||
[childRecords release];
|
||||
[folderSubscriptionValues release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@@ -287,9 +285,6 @@ static NSArray *childRecordFields = nil;
|
||||
- (void) _setDisplayNameFromRow: (NSDictionary *) row
|
||||
{
|
||||
NSString *primaryDN;
|
||||
NSDictionary *ownerIdentity;
|
||||
NSString *subjectFormat;
|
||||
SOGoDomainDefaults *dd;
|
||||
|
||||
primaryDN = [row objectForKey: @"c_foldername"];
|
||||
|
||||
@@ -301,7 +296,7 @@ static NSArray *childRecordFields = nil;
|
||||
displayName = [self labelForKey: primaryDN
|
||||
inContext: context];
|
||||
else
|
||||
displayName =primaryDN;
|
||||
displayName = primaryDN;
|
||||
|
||||
RETAIN(displayName);
|
||||
}
|
||||
@@ -348,7 +343,31 @@ static NSArray *childRecordFields = nil;
|
||||
|
||||
- (void) _fetchDisplayNameFromSubscriber
|
||||
{
|
||||
NSDictionary *ownerIdentity, *folderSubscriptionValues;
|
||||
NSString *displayNameFormat;
|
||||
SOGoDomainDefaults *dd;
|
||||
|
||||
displayName = [self folderPropertyValueInCategory: @"FolderDisplayNames"];
|
||||
if (!displayName)
|
||||
{
|
||||
[self _fetchDisplayNameFromOwner];
|
||||
|
||||
// We MUST NOT use SOGoUser instances here (by calling -primaryIdentity)
|
||||
// as it'll load user defaults and user settings which is _very costly_
|
||||
// since it involves JSON parsing and database requests
|
||||
ownerIdentity = [[SOGoUserManager sharedUserManager]
|
||||
contactInfosForUserWithUIDorEmail: owner];
|
||||
|
||||
folderSubscriptionValues = [[NSDictionary alloc] initWithObjectsAndKeys: displayName, @"FolderName",
|
||||
[ownerIdentity objectForKey: @"cn"], @"UserName",
|
||||
[ownerIdentity objectForKey: @"c_email"], @"Email", nil];
|
||||
|
||||
dd = [[context activeUser] domainDefaults];
|
||||
displayNameFormat = [dd subscriptionFolderFormat];
|
||||
|
||||
displayName = [folderSubscriptionValues keysWithFormat: displayNameFormat];
|
||||
}
|
||||
|
||||
[displayName retain];
|
||||
}
|
||||
|
||||
@@ -855,13 +874,10 @@ static NSArray *childRecordFields = nil;
|
||||
reallyDo: (BOOL) reallyDo
|
||||
response: (WOResponse *) theResponse
|
||||
{
|
||||
NSDictionary *ownerIdentity, *folderSubscriptionValues;
|
||||
NSMutableDictionary *moduleSettings, *folderShowAlarms;
|
||||
NSString *subjectFormat, *formattedName;
|
||||
NSMutableArray *folderSubscription;
|
||||
NSString *subscriptionPointer;
|
||||
NSMutableArray *allUsers;
|
||||
SOGoDomainDefaults *dd;
|
||||
SOGoUserSettings *us;
|
||||
NSDictionary *dict;
|
||||
SOGoUser *sogoUser;
|
||||
@@ -869,7 +885,7 @@ static NSArray *childRecordFields = nil;
|
||||
int i;
|
||||
|
||||
dict = [[SOGoUserManager sharedUserManager] contactInfosForUserWithUIDorEmail: theIdentifier];
|
||||
|
||||
|
||||
if ([[dict objectForKey: @"isGroup"] boolValue])
|
||||
{
|
||||
SOGoGroup *aGroup;
|
||||
@@ -891,28 +907,12 @@ static NSArray *childRecordFields = nil;
|
||||
else
|
||||
allUsers = [NSArray array];
|
||||
}
|
||||
|
||||
|
||||
rc = NO;
|
||||
|
||||
// We MUST NOT use SOGoUser instances here (by calling -primaryIdentity)
|
||||
// as it'll load user defaults and user settings which is _very costly_
|
||||
// since it involves JSON parsing and database requests
|
||||
ownerIdentity = [[SOGoUserManager sharedUserManager]
|
||||
contactInfosForUserWithUIDorEmail: owner];
|
||||
|
||||
|
||||
folderSubscriptionValues = [[NSDictionary alloc] initWithObjectsAndKeys: [self displayName], @"FolderName",
|
||||
[ownerIdentity objectForKey: @"cn"], @"UserName",
|
||||
[ownerIdentity objectForKey: @"c_email"], @"Email", nil];
|
||||
|
||||
dd = [[context activeUser] domainDefaults];
|
||||
subjectFormat = [dd subscriptionFolderFormat];
|
||||
|
||||
formattedName = [folderSubscriptionValues keysWithFormat: subjectFormat];
|
||||
|
||||
|
||||
// This is consumed by SOGo Integrator during folder subscription since v24.0.6
|
||||
if (theResponse)
|
||||
[theResponse appendContentString: formattedName];
|
||||
[theResponse appendContentString: [self displayName]];
|
||||
|
||||
for (i = 0; i < [allUsers count]; i++)
|
||||
{
|
||||
@@ -926,8 +926,7 @@ static NSArray *childRecordFields = nil;
|
||||
[us setObject: moduleSettings forKey: [container nameInContainer]];
|
||||
}
|
||||
|
||||
folderSubscription
|
||||
= [moduleSettings objectForKey: @"SubscribedFolders"];
|
||||
folderSubscription = [moduleSettings objectForKey: @"SubscribedFolders"];
|
||||
subscriptionPointer = [self folderReference];
|
||||
|
||||
folderShowAlarms = [moduleSettings objectForKey: @"FolderShowAlarms"];
|
||||
@@ -950,7 +949,7 @@ static NSArray *childRecordFields = nil;
|
||||
forKey: @"FolderShowAlarms"];
|
||||
}
|
||||
|
||||
[self setFolderPropertyValue: formattedName
|
||||
[self setFolderPropertyValue: [self displayName]
|
||||
inCategory: @"FolderDisplayNames"
|
||||
settings: us];
|
||||
|
||||
|
||||
@@ -558,14 +558,14 @@ typedef enum SOGoToolRestoreMode {
|
||||
if (tables)
|
||||
{
|
||||
NSLog (@"Restorable folders:");
|
||||
folderPrefixLen = 1 + [userID length];
|
||||
tableKeys = [[tables allKeys] objectEnumerator];
|
||||
folderPrefixLen = 8 + [userID length]; // tables keys start with /Users/<userID>
|
||||
tableKeys = [[[tables allKeys] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)] objectEnumerator];
|
||||
while ((key = [tableKeys nextObject]))
|
||||
{
|
||||
currentFolder = [tables objectForKey: key];
|
||||
folderKey = [key substringFromIndex: folderPrefixLen];
|
||||
NSLog (@" '%@': %@",
|
||||
[currentFolder objectForKey: @"displayname"], folderKey);
|
||||
NSLog (@" %@ (%@)",
|
||||
folderKey, [currentFolder objectForKey: @"displayname"]);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -3332,7 +3332,7 @@ function updateCalendarProperties(calendarID, calendarName, calendarColor) {
|
||||
// log("nodeID: " + nodeID);
|
||||
var calendarNode = $(nodeID);
|
||||
var displayNameNode = calendarNode.childNodesWithTag("span")[0];
|
||||
displayNameNode.innerHTML = calendarName;
|
||||
displayNameNode.innerHTML = calendarName.escapeHTML();
|
||||
|
||||
appendStyleElement(nodeID, calendarColor);
|
||||
}
|
||||
@@ -3516,7 +3516,7 @@ function appendCalendar(folderName, folderPath) {
|
||||
li.appendChild(colorBox);
|
||||
|
||||
var displayName = document.createElement("span");
|
||||
displayName.appendChild(document.createTextNode(folderName));
|
||||
displayName.appendChild(document.createTextNode(folderName.escapeHTML()));
|
||||
li.appendChild(displayName);
|
||||
|
||||
$(colorBox).addClassName("colorBox");
|
||||
|
||||
@@ -158,8 +158,8 @@ function foldersSearchCallback(http) {
|
||||
d.aIndent.push(indentValue);
|
||||
|
||||
var dd = $("dd" + nodeId);
|
||||
if (response.length) {
|
||||
var folders = response.evalJSON();
|
||||
var folders = response.evalJSON();
|
||||
if (folders.length) {
|
||||
var user = http.callbackData["user"];
|
||||
|
||||
dd.innerHTML = '';
|
||||
|
||||
Reference in New Issue
Block a user