Merge pull request #190 from zentyal/jgarcia/freebusy-multidomain
Fix freebusy for multidomain environments
This commit is contained in:
commit
6ada034c33
|
@ -48,6 +48,7 @@
|
||||||
#import <SOGo/SOGoPermissions.h>
|
#import <SOGo/SOGoPermissions.h>
|
||||||
#import <SOGo/SOGoSource.h>
|
#import <SOGo/SOGoSource.h>
|
||||||
#import <SOGo/SOGoUserSettings.h>
|
#import <SOGo/SOGoUserSettings.h>
|
||||||
|
#import <SOGo/SOGoSystemDefaults.h>
|
||||||
#import <SOGo/WORequest+SOGo.h>
|
#import <SOGo/WORequest+SOGo.h>
|
||||||
#import <SOGo/WOResponse+SOGo.h>
|
#import <SOGo/WOResponse+SOGo.h>
|
||||||
|
|
||||||
|
@ -236,6 +237,13 @@
|
||||||
data = @"";
|
data = @"";
|
||||||
[newRecord setObject: data forKey: @"c_cn"];
|
[newRecord setObject: data forKey: @"c_cn"];
|
||||||
|
|
||||||
|
if ([[SOGoSystemDefaults sharedSystemDefaults] enableDomainBasedUID])
|
||||||
|
{
|
||||||
|
data = [oldRecord objectForKey: @"c_domain"];
|
||||||
|
if (data)
|
||||||
|
[newRecord setObject: data forKey: @"c_domain"];
|
||||||
|
}
|
||||||
|
|
||||||
data = [oldRecord objectForKey: @"mail"];
|
data = [oldRecord objectForKey: @"mail"];
|
||||||
if (!data)
|
if (!data)
|
||||||
data = @"";
|
data = @"";
|
||||||
|
|
|
@ -221,9 +221,11 @@ function performSearchCallback(http) {
|
||||||
node.address = completeEmail;
|
node.address = completeEmail;
|
||||||
// log("node.address: " + node.address);
|
// log("node.address: " + node.address);
|
||||||
if (contact["c_uid"]) {
|
if (contact["c_uid"]) {
|
||||||
node.uid = (contact["isMSExchange"]? UserLogin + ":" : "") + contact["c_uid"];
|
var login = contact["c_uid"];
|
||||||
}
|
if (contact["c_domain"])
|
||||||
else {
|
login += "@" + contact["c_domain"];
|
||||||
|
node.uid = (contact["isMSExchange"]? UserLogin + ":" : "") + login;
|
||||||
|
} else
|
||||||
node.uid = null;
|
node.uid = null;
|
||||||
node.appendChild(new Element('div').addClassName('colorBox').addClassName('noFreeBusy'));
|
node.appendChild(new Element('div').addClassName('colorBox').addClassName('noFreeBusy'));
|
||||||
}
|
}
|
||||||
|
@ -275,13 +277,16 @@ function performSearchCallback(http) {
|
||||||
else {
|
else {
|
||||||
if (document.currentPopupMenu)
|
if (document.currentPopupMenu)
|
||||||
hideMenu(document.currentPopupMenu);
|
hideMenu(document.currentPopupMenu);
|
||||||
|
|
||||||
if (data.contacts.length == 1) {
|
if (data.contacts.length == 1) {
|
||||||
// Single result
|
// Single result
|
||||||
var contact = data.contacts[0];
|
var contact = data.contacts[0];
|
||||||
if (contact["c_uid"])
|
if (contact["c_uid"]) {
|
||||||
input.uid = (contact["isMSExchange"]? UserLogin + ":" : "") + contact["c_uid"];
|
var login = contact["c_uid"];
|
||||||
else
|
if (contact["c_domain"])
|
||||||
|
login += "@" + contact["c_domain"];
|
||||||
|
input.uid = (contact["isMSExchange"]? UserLogin + ":" : "") + login;
|
||||||
|
} else
|
||||||
input.uid = null;
|
input.uid = null;
|
||||||
var isList = (contact["c_component"] &&
|
var isList = (contact["c_component"] &&
|
||||||
contact["c_component"] == "vlist");
|
contact["c_component"] == "vlist");
|
||||||
|
|
Loading…
Reference in a new issue