mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-22 07:14:21 +00:00
See ChangeLog
Monotone-Parent: ed15d4f340fd47347d881c8826eb40a2dc22763d Monotone-Revision: d669b0b3e321e22c68d092f984d543560ae1af0e Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2012-01-12T20:01:34
This commit is contained in:
1 parent
335ba606b4
commit
ccf847f555
19 files changed
+886
-36
No files matched your search
@@ -158,6 +158,7 @@
|
||||
- (NSString *) _freeBusyFromStartDate: (NSCalendarDate *) startDate
|
||||
toEndDate: (NSCalendarDate *) endDate
|
||||
forFreeBusy: (SOGoFreeBusyObject *) fb
|
||||
andUser: (NSString *) user
|
||||
{
|
||||
NSMutableArray *freeBusy;
|
||||
unsigned int *freeBusyItems;
|
||||
@@ -169,7 +170,7 @@
|
||||
|
||||
freeBusyItems = NSZoneCalloc (NULL, intervals, sizeof (int));
|
||||
[self _fillFreeBusyItems: freeBusyItems count: intervals
|
||||
withRecords: [fb fetchFreeBusyInfosFrom: startDate to: endDate]
|
||||
withRecords: [fb fetchFreeBusyInfosFrom: startDate to: endDate forUser: user]
|
||||
fromStartDate: startDate toEndDate: endDate];
|
||||
|
||||
freeBusy = [NSMutableArray arrayWithCapacity: intervals];
|
||||
@@ -184,15 +185,16 @@
|
||||
- (id <WOActionResults>) readFreeBusyAction
|
||||
{
|
||||
WOResponse *response;
|
||||
SOGoFreeBusyObject *co;
|
||||
SOGoFreeBusyObject *freebusy;
|
||||
NSCalendarDate *startDate, *endDate;
|
||||
NSString *queryDay;
|
||||
NSString *queryDay, *uid;
|
||||
NSTimeZone *uTZ;
|
||||
SOGoUser *user;
|
||||
|
||||
user = [context activeUser];
|
||||
uTZ = [[user userDefaults] timeZone];
|
||||
|
||||
uid = [self queryParameterForKey: @"uid"];
|
||||
queryDay = [self queryParameterForKey: @"sday"];
|
||||
if ([queryDay length] == 8)
|
||||
{
|
||||
@@ -211,13 +213,13 @@
|
||||
andString: @"Start date is later than end date."];
|
||||
else
|
||||
{
|
||||
co = [self clientObject];
|
||||
freebusy = [self clientObject];
|
||||
response
|
||||
= [self responseWithStatus: 200
|
||||
andString: [self
|
||||
_freeBusyFromStartDate: startDate
|
||||
toEndDate: endDate
|
||||
forFreeBusy: co]];
|
||||
andString: [self _freeBusyFromStartDate: startDate
|
||||
toEndDate: endDate
|
||||
forFreeBusy: freebusy
|
||||
andUser: uid]];
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -219,7 +219,7 @@ function performSearchCallback(http) {
|
||||
list.appendChild(node);
|
||||
node.address = completeEmail;
|
||||
// log("node.address: " + node.address);
|
||||
node.uid = contact["c_uid"];
|
||||
node.uid = (contact["isMSExchange"]? UserLogin + ":" : "") + contact["c_uid"];
|
||||
node.isList = isList;
|
||||
if (isList) {
|
||||
node.cname = contact["c_name"];
|
||||
@@ -272,7 +272,7 @@ function performSearchCallback(http) {
|
||||
if (data.contacts.length == 1) {
|
||||
// Single result
|
||||
var contact = data.contacts[0];
|
||||
input.uid = contact["c_uid"];
|
||||
input.uid = (contact["isMSExchange"]? UserLogin + ":" : "") + contact["c_uid"];
|
||||
var isList = (contact["c_component"] &&
|
||||
contact["c_component"] == "vlist");
|
||||
if (isList) {
|
||||
@@ -997,11 +997,19 @@ freeBusyRequest.prototype = {
|
||||
},
|
||||
|
||||
_performAjaxRequest: function fBR__performAjaxRequest(rqStart, rqEnd) {
|
||||
var urlstr = (UserFolderURL + "../" + this.mUid
|
||||
+ "/freebusy.ifb/ajaxRead?"
|
||||
+ "sday=" + rqStart.getDayString()
|
||||
+ "&eday=" + rqEnd.getDayString());
|
||||
|
||||
var urlstr = UserFolderURL + "../";
|
||||
var uids = this.mUid.split(":");
|
||||
if (uids.length > 1)
|
||||
urlstr += (uids[0]
|
||||
+ "/freebusy.ifb/ajaxRead?"
|
||||
+ "uid=" + uids[1]
|
||||
+ "&");
|
||||
else
|
||||
urlstr += (this.mUid
|
||||
+ "/freebusy.ifb/ajaxRead?");
|
||||
urlstr += ("sday=" + rqStart.getDayString()
|
||||
+ "&eday=" + rqEnd.getDayString());
|
||||
|
||||
var thisRequest = this;
|
||||
var callback = function fBR__performAjaxRequest_cb(http) {
|
||||
if (http.readyState == 4) {
|
||||
|
||||
Reference in new issue
Block a user