Fix cosmetic change when fetching fb info

pull/69/merge
Ludovic Marcotte 2015-01-19 13:54:04 -05:00
parent 3e59b1ad6e
commit daa7ab87d7
2 changed files with 7 additions and 5 deletions

View File

@ -1479,8 +1479,10 @@ case, SOGo will consider the returned entry to be a resource.
which a resource can be part of at any point in time.
If this is set to `0`, or if the attribute is missing, it means no
limit. If set to `-1`, no limit is imposed but the resource will
be marked as busy the first time it is booked.
limit and the resource will always be marked as free. If set to `-1`,
no limit is imposed but the resource will be marked as busy the first
time it is booked. If greater than 0, the resource will get marked as
busy once it reaches the value.
|DomainFieldName (optional)
|If set, SOGo will use the value of that field as the domain associated

View File

@ -103,7 +103,7 @@
maxBookings = [user numberOfSimultaneousBookings];
isResource = [user isResource];
// Don't fetch freebusy information if the user is of type 'resource' and has unlimited bookings
// Fetch freebusy information if the user is NOT a resource or if multiplebookings isn't unlimited
if (!isResource || maxBookings != 0)
{
for (recordCount = 0; recordCount < recordMax; recordCount++)
@ -167,10 +167,10 @@
endInterval += (delta/60/15);
// Update bit string representation
// If the user is a resource, keep the sum of overlapping events
// If the user is a resource with restristed amount of bookings, keep the sum of overlapping events
for (count = startInterval; count < endInterval; count++)
{
*(items + count) = isResource ? *(items + count) + 1 : 1;
*(items + count) = (isResource && maxBookings > 0) ? *(items + count) + 1 : 1;
}
}
}