mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-05 16:35:10 +00:00
Merge branch 'master' into feature/addMissingStrings2
Conflicts: UI/AdministrationUI/English.lproj/Localizable.strings UI/PreferencesUI/English.lproj/Localizable.strings UI/Templates/PreferencesUI/UIxFilterEditor.wox
This commit is contained in:
@@ -30,6 +30,9 @@
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGObjWeb/WOResponse.h>
|
||||
|
||||
#import <Common/WODirectAction+SOGo.h>
|
||||
#import <ActiveSync/SOGoActiveSyncDispatcher.h>
|
||||
|
||||
@interface SOGoMicrosoftActiveSyncActions : WODirectAction
|
||||
@end
|
||||
|
||||
@@ -47,7 +50,7 @@
|
||||
id dispatcher;
|
||||
Class clazz;
|
||||
|
||||
request = [context request];
|
||||
request = (WORequest *)[context request];
|
||||
response = [self responseWithStatus: 200];
|
||||
|
||||
bundle = [NSBundle bundleForClass: NSClassFromString(@"ActiveSyncProduct")];
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
timeZone: [currentStartDate timeZone]];
|
||||
|
||||
// Increment counters for quarters of first hour
|
||||
hourKey = [NSString stringWithFormat: @"%u", [currentDate hourOfDay]];
|
||||
hourKey = [NSString stringWithFormat: @"%u", (unsigned int)[currentDate hourOfDay]];
|
||||
hourData = [dayData objectForKey: hourKey];
|
||||
if (!hourData)
|
||||
{
|
||||
@@ -224,7 +224,7 @@
|
||||
while ([currentDate compare: currentEndDate] == NSOrderedAscending &&
|
||||
[currentEndDate timeIntervalSinceDate: currentDate] >= 3600) // 1 hour
|
||||
{
|
||||
hourKey = [NSString stringWithFormat: @"%u", [currentDate hourOfDay]];
|
||||
hourKey = [NSString stringWithFormat: @"%u", (unsigned int)[currentDate hourOfDay]];
|
||||
hourData = [dayData objectForKey: hourKey];
|
||||
if (!hourData)
|
||||
{
|
||||
@@ -251,7 +251,7 @@
|
||||
// Increment counters for quarters of last hour
|
||||
if ([currentEndDate timeIntervalSinceDate: currentDate] > 0)
|
||||
{
|
||||
hourKey = [NSString stringWithFormat: @"%u", [currentDate hourOfDay]];
|
||||
hourKey = [NSString stringWithFormat: @"%u", (unsigned int)[currentDate hourOfDay]];
|
||||
hourData = [dayData objectForKey: hourKey];
|
||||
if (!hourData)
|
||||
{
|
||||
@@ -636,7 +636,7 @@
|
||||
* @apiExample {curl} Example usage:
|
||||
* curl -i http://localhost/SOGo/so/sogo1/foldersSearch?type=contact
|
||||
*
|
||||
* @apiParam {String} type Either 'calendar' or 'contact'
|
||||
* @apiParam {String} type Either 'calendar' or 'contact'. If nothing is specifed, its both.
|
||||
*
|
||||
* @apiSuccess (Success 200) {Object[]} folders List of matching folders
|
||||
* @apiSuccess (Success 200) {String} folders.name Path of folder
|
||||
@@ -648,27 +648,31 @@
|
||||
- (id <WOActionResults>) foldersSearchAction
|
||||
{
|
||||
NSString *folderType;
|
||||
NSArray *folders;
|
||||
NSMutableArray *folders;
|
||||
NSDictionary *message;
|
||||
id <WOActionResults> result;
|
||||
SOGoUserFolder *userFolder;
|
||||
|
||||
|
||||
folderType = [self queryParameterForKey: @"type"];
|
||||
folders = [NSMutableArray array];
|
||||
userFolder = [self clientObject];
|
||||
|
||||
if ([folderType length])
|
||||
{
|
||||
userFolder = [self clientObject];
|
||||
folders = [userFolder foldersOfType: folderType
|
||||
forUID: [userFolder ownerInContext: context]];
|
||||
result = [self _foldersResponseForResults: folders];
|
||||
[folders addObjectsFromArray: [userFolder foldersOfType: folderType
|
||||
forUID: [userFolder ownerInContext: context]]];
|
||||
}
|
||||
else
|
||||
{
|
||||
message = [NSDictionary dictionaryWithObject: [self labelForKey: @"Missing type parameter"]
|
||||
forKey: @"error"];
|
||||
result = [self responseWithStatus: 400 andJSONRepresentation: message];
|
||||
[folders addObjectsFromArray: [userFolder foldersOfType: @"calendar"
|
||||
forUID: [userFolder ownerInContext: context]]];
|
||||
[folders addObjectsFromArray: [userFolder foldersOfType: @"contact"
|
||||
forUID: [userFolder ownerInContext: context]]];
|
||||
}
|
||||
|
||||
result = [self _foldersResponseForResults: folders];
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user