merge of '3e7ab09417e0eb7a43c8f716a4a51471466afee8'

and '7576485920bab942eaccc45f2ab5b1914255643d'

Monotone-Parent: 3e7ab09417e0eb7a43c8f716a4a51471466afee8
Monotone-Parent: 7576485920bab942eaccc45f2ab5b1914255643d
Monotone-Revision: a4b72920f072cccd72e189b05519b57436eb9471

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-04-21T14:14:56
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2010-04-21 14:14:56 +00:00
commit 28911e16dd
33 changed files with 93 additions and 77 deletions

View File

@ -1,3 +1,8 @@
2010-04-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* EOAdaptorChannel+GCS.m (-tableExistsWithName:): cleaned method
up.
2009-11-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* GCSChannelManager.m (-databaseKeyForURL): removed obsolete

View File

@ -26,28 +26,27 @@
@implementation EOAdaptorChannel(GCS)
- (BOOL) tableExistsWithName: (NSString *) _tableName
- (BOOL) tableExistsWithName: (NSString *) tableName
{
NSException *ex;
NSString *sql;
BOOL didOpen;
NSString *sql;
BOOL didOpen;
didOpen = NO;
if (![self isOpen]) {
if (![self openChannel])
return NO;
didOpen = YES;
}
sql = @"SELECT COUNT(*) FROM ";
sql = [sql stringByAppendingString:_tableName];
sql = [sql stringByAppendingString:@" WHERE 1 = 2"];
ex = [[[self evaluateExpressionX:sql] retain] autorelease];
sql = [NSString stringWithFormat: @"SELECT COUNT(*) FROM %@ WHERE 1 = 2",
tableName];
ex = [self evaluateExpressionX: sql];
[self cancelFetch];
if (didOpen) [self closeChannel];
return ex != nil ? NO : YES;
return (ex == nil);
}
- (void) dropTables: (NSArray *) tableNames

View File

@ -73,13 +73,12 @@
BOOL isCI;
qKey = [_q key];
isCI = NO;
if ((val = [_q value])) {
SEL op = [_q selector];
if ([val isNotNull]) {
isCI = NO;
if (sel_eq(op, EOQualifierOperatorEqual))
qOperator = @"=";
else if (sel_eq(op, EOQualifierOperatorNotEqual))
@ -110,12 +109,12 @@
qValue = [NSString stringWithFormat: @"'%@'", val];
}
else {
qValue = @"NULL";
[self errorWithFormat:@"%s: unsupported value class: %@",
__PRETTY_FUNCTION__, NSStringFromClass([val class])];
}
}
else {
isCI = NO;
if (sel_eq(op, EOQualifierOperatorEqual)) {
qOperator = @"IS";
qValue = @"NULL";

View File

@ -899,6 +899,8 @@ static NSArray *contentFieldNames = nil;
return nil;
}
}
else
quickChannel = nil;
/* we check if we can call directly methods on our adaptor
channel delegate. If not, we generate SQL ourself since it'll

View File

@ -46,6 +46,7 @@
#import <SOGo/SOGoPermissions.h>
#import <SOGo/SOGoGroup.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoDomainDefaults.h>
#import <SOGo/SOGoWebDAVValue.h>
#import <SOGo/WORequest+SOGo.h>

View File

@ -31,10 +31,6 @@
#import "SOGoAptMailNotification.h"
@interface SOGoAptMailUpdate : SOGoAptMailNotification
{
NSMutableDictionary *values;
}
@end
@implementation SOGoAptMailUpdate

View File

@ -958,6 +958,8 @@ static BOOL debugSoParts = NO;
password: password];
}
}
else
exc = nil;
return exc;
}

View File

@ -20,6 +20,8 @@
* Boston, MA 02111-1307, USA.
*/
#include <ldap.h>
#import <Foundation/NSArray.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSString.h>
@ -123,12 +125,12 @@ static NSArray *commonSearchFields;
}
+ (id) sourceFromUDSource: (NSDictionary *) udSource
inDomain: (NSString *) domain
inDomain: (NSString *) sourceDomain
{
id newSource;
newSource = [[self alloc] initFromUDSource: udSource
inDomain: domain];
inDomain: sourceDomain];
[newSource autorelease];
return newSource;

View File

@ -22,6 +22,7 @@
#import <Foundation/NSArray.h>
#import <Foundation/NSBundle.h>
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSString.h>
#import <NGObjWeb/WOContext+SoObjects.h>

View File

@ -87,11 +87,11 @@
{
SOGoCASSession *session;
SOGoCache *cache;
NSString *ticket;
NSString *casTicket;
cache = [SOGoCache sharedCache];
ticket = [cache CASTicketFromIdentifier: identifier];
session = [self CASSessionWithTicket: ticket];
casTicket = [cache CASTicketFromIdentifier: identifier];
session = [self CASSessionWithTicket: casTicket];
return session;
}
@ -303,13 +303,11 @@
- (void) _parseDOMResponse: (NGDOMDocument *) response
{
NGDOMElement *top;
id <DOMNodeList> nodes;
NGDOMElement *currentNode;
int count, max;
top = [response documentElement];
nodes = [top childNodes];
nodes = [[response documentElement] childNodes];
max = [nodes length];
for (count = 0; count < max; count++)
{

View File

@ -21,6 +21,7 @@
*/
#import <Foundation/NSArray.h>
#import <Foundation/NSData.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSException.h>
#import <Foundation/NSString.h>

View File

@ -28,6 +28,7 @@
#import <Foundation/NSValue.h>
#import <NGObjWeb/WOContext.h>
#import <NGObjWeb/WORequest.h>
#import <NGObjWeb/SoWebDAVValue.h>
#import <NGExtensions/NSObject+Logs.h>
@ -65,22 +66,22 @@
+ (SOGoWebDAVAclManager *) webdavAclManager
{
static SOGoWebDAVAclManager *webdavAclManager = nil;
static SOGoWebDAVAclManager *aclManager = nil;
if (!webdavAclManager)
if (!aclManager)
{
webdavAclManager = [SOGoWebDAVAclManager new];
[webdavAclManager registerDAVPermission: davElement (@"read", XMLNS_WEBDAV)
aclManager = [SOGoWebDAVAclManager new];
[aclManager registerDAVPermission: davElement (@"read", XMLNS_WEBDAV)
abstract: YES
withEquivalent: SoPerm_WebDAVAccess
asChildOf: davElement (@"all", XMLNS_WEBDAV)];
[webdavAclManager registerDAVPermission: davElement (@"read-current-user-privilege-set", XMLNS_WEBDAV)
[aclManager registerDAVPermission: davElement (@"read-current-user-privilege-set", XMLNS_WEBDAV)
abstract: YES
withEquivalent: nil
asChildOf: davElement (@"read", XMLNS_WEBDAV)];
}
return webdavAclManager;
return aclManager;
}
- (id) init

View File

@ -156,13 +156,13 @@ static NSArray *childRecordFields = nil;
id newFolder;
NSArray *elements, *pathElements;
NSString *path, *objectPath, *login, *currentUser, *ocsName, *folderName;
WOContext *context;
BOOL isSubscription;
WOContext *localContext;
BOOL localIsSubscription;
elements = [reference componentsSeparatedByString: @":"];
login = [elements objectAtIndex: 0];
context = [[WOApplication application] context];
currentUser = [[context activeUser] login];
localContext = [[WOApplication application] context];
currentUser = [[localContext activeUser] login];
objectPath = [elements objectAtIndex: 1];
pathElements = [objectPath componentsSeparatedByString: @"/"];
if ([pathElements count] > 1)
@ -177,8 +177,9 @@ static NSArray *childRecordFields = nil;
newFolder = [self objectWithName: folderName inContainer: aContainer];
[newFolder setOCSPath: path];
[newFolder setOwner: login];
isSubscription = ![login isEqualToString: [aContainer ownerInContext: context]];
[newFolder setIsSubscription: isSubscription];
localIsSubscription = ![login isEqualToString:
[aContainer ownerInContext: localContext]];
[newFolder setIsSubscription: localIsSubscription];
if (![newFolder displayName])
newFolder = nil;

View File

@ -31,12 +31,14 @@
@class NSString;
@class NGLdapEntry;
@protocol SOGoSource;
@interface SOGoGroup : NSObject
{
@private
NSString *_identifier;
NGLdapEntry *_entry;
LDAPSource *_source;
NSObject <SOGoSource> *_source;
NSMutableArray *_members;
}

View File

@ -151,6 +151,9 @@
- (NSString *) davRecordForUser: (NSString *) user
parameters: (NSArray *) params;
/* utilities */
- (NSString *) labelForKey: (NSString *) key;
/* description */
- (void) appendAttributesToDescription:(NSMutableString *)_ms;

View File

@ -1391,7 +1391,7 @@
}
- (NSException *) davSetProperties: (NSDictionary *) setProps
removePropertiesNamed: (NSDictionary *) removedProps
removePropertiesNamed: (NSArray *) removedProps
inContext: (WOContext *) localContext
{
NSString *currentProp;

View File

@ -35,9 +35,12 @@
#import <GDLContentStore/GCSFolderManager.h>
#import <GDLContentStore/NSURL+GCS.h>
#import <GDLAccess/EOAdaptorChannel.h>
#import <DOM/DOMElement.h>
#import <DOM/DOMProtocols.h>
#import <SaxObjC/XMLNamespaces.h>
#import <SOGo/SOGoUserSettings.h>
#import "NSObject+DAV.h"
#import "SOGoGCSFolder.h"
#import "SOGoPermissions.h"

View File

@ -134,9 +134,6 @@
- (SOGoAppointmentFolder *)
personalCalendarFolderInContext: (WOContext *) context;
- (NSArray *) rolesForObject: (NSObject *) object
inContext: (WOContext *) context;
@end
#endif /* __SOGoUser_H__ */

View File

@ -36,6 +36,8 @@
#import <NGExtensions/NSNull+misc.h>
#import <NGExtensions/NSObject+Logs.h>
#import <Appointments/SOGoAppointmentFolders.h>
#import "NSArray+Utilities.h"
#import "SOGoCache.h"
#import "SOGoDateFormatter.h"

View File

@ -49,7 +49,7 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
{
SOGoUserProfile *up;
SOGoUserDefaults *ud;
SOGoDefaultsSource *parentSource;
SOGoDefaultsSource *parent;
static Class SOGoUserProfileKlass = Nil;
if (!SOGoUserProfileKlass)
@ -82,12 +82,11 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
// [self invalidateLanguage];
// }
parentSource = [SOGoDomainDefaults defaultsForDomain: domainId];
if (!parentSource)
parentSource = [SOGoSystemDefaults sharedSystemDefaults];
parent = [SOGoDomainDefaults defaultsForDomain: domainId];
if (!parent)
parent = [SOGoSystemDefaults sharedSystemDefaults];
ud = [self defaultsSourceWithSource: up
andParentSource: parentSource];
ud = [self defaultsSourceWithSource: up andParentSource: parent];
return ud;
}

View File

@ -45,8 +45,6 @@
/* ownership */
- (NSString *) ownerInContext: (WOContext *) _ctx;
- (NSArray *) foldersOfType: (NSString *) folderType
forUID: (NSString *) uid;
- (NSDictionary *) foldersOfType: (NSString *) type

View File

@ -21,6 +21,7 @@
*/
#import <Foundation/NSArray.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSString.h>
#import "SOGoUserProfile.h"

View File

@ -150,7 +150,7 @@
memset(md, 0, MD5_DIGEST_LENGTH);
memset(buf, 0, 80);
EVP_Digest([plainPassword UTF8String], strlen([plainPassword UTF8String]), md, NULL, EVP_md5(), NULL);
EVP_Digest((const void *) [plainPassword UTF8String], strlen([plainPassword UTF8String]), md, NULL, EVP_md5(), NULL);
for (i = 0; i < MD5_DIGEST_LENGTH; i++)
sprintf(&(buf[i*2]), "%02x", md[i]);

View File

@ -93,7 +93,7 @@
}
- (BOOL) _handleData: (NSData *) socketData
onSocket: (NGActiveSocket *) responseSocket
onSocket: (id <NGActiveSocket>) responseSocket
{
NSString *stringData;
SOGoSockDScanner *scanner;
@ -109,7 +109,7 @@
if (operation)
{
rc = YES;
[operation respondOnSocket: responseSocket];
[operation respondOnSocket: (NGActiveSocket *) responseSocket];
}
else
rc = NO;
@ -122,7 +122,7 @@
- (void) _acceptAndHandle
{
NGActiveSocket *socket;
id <NGActiveSocket> socket;
char buffer[1024];
unsigned int count;
NSMutableData *socketData;

View File

@ -30,6 +30,7 @@
#import <Contacts/SOGoContactFolders.h>
#import <Contacts/SOGoContactGCSFolder.h>
#import <SOGo/SOGoProductLoader.h>
#import <SOGo/SOGoUserFolder.h>
#import <SOGo/NSDictionary+Utilities.h>
#import <SOGo/NSString+Utilities.h>
@ -50,7 +51,7 @@
}
+ (SOGoSockDOperation *) operationWithMethod: (NSString *) method
andParameters: (NSDictionary *) parameters
andParameters: (NSDictionary *) opParameters
{
static NSArray *operations = nil;
NSString *className;
@ -66,7 +67,7 @@
[method capitalizedString]];
newOperation = [NSClassFromString (className) new];
[newOperation autorelease];
[newOperation setParameters: parameters];
[newOperation setParameters: opParameters];
}
else
newOperation = nil;

View File

@ -36,8 +36,8 @@
+ (NSString *) command;
+ (NSString *) description;
+ (BOOL) runToolWithArguments: (NSArray *) arguments
verbose: (BOOL) verbose;
+ (BOOL) runToolWithArguments: (NSArray *) toolArguments
verbose: (BOOL) isVerbose;
- (void) setArguments: (NSArray *) newArguments;
- (void) setVerbose: (BOOL) newVerbose;

View File

@ -20,6 +20,7 @@
* Boston, MA 02111-1307, USA.
*/
#import <Foundation/NSArray.h>
#import <Foundation/NSString.h>
#import "SOGoTool.h"
@ -39,16 +40,16 @@
return nil;
}
+ (BOOL) runToolWithArguments: (NSArray *) arguments
verbose: (BOOL) verbose
+ (BOOL) runToolWithArguments: (NSArray *) toolArguments
verbose: (BOOL) isVerbose
{
SOGoTool *instance;
instance = [self new];
[instance autorelease];
[instance setArguments: arguments];
[instance setVerbose: verbose];
[instance setArguments: toolArguments];
[instance setVerbose: isVerbose];
return [instance run];
}

View File

@ -99,7 +99,6 @@
{
NSFileManager *fm;
BOOL exists, isDir, rc;
NSError *createError;
fm = [NSFileManager defaultManager];
exists = [fm fileExistsAtPath: directory isDirectory: &isDir];
@ -116,12 +115,9 @@
else
{
rc = [fm createDirectoryAtPath: directory
withIntermediateDirectories: YES
attributes: nil
error: &createError];
attributes: nil];
if (!rc)
NSLog (@"an error occured during directory creation: %@",
createError);
NSLog (@"an error occured during directory creation");
}
return rc;

View File

@ -21,6 +21,7 @@
*/
#import <Foundation/NSCharacterSet.h>
#import <Foundation/NSDictionary.h>
#import <NGObjWeb/WORequest.h>
#import <NGObjWeb/WOResponse.h>

View File

@ -27,7 +27,8 @@
#import <NGObjWeb/WOContext.h>
#import <SoObjects/SOGo/SOGoUser.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserSettings.h>
#import "UIxCalFilterPanel.h"

View File

@ -31,15 +31,16 @@
#import <NGObjWeb/WORequest.h>
#import <NGObjWeb/WOResponse.h>
#import <SOGo/NSArray+Utilities.h>
#import <SOGo/SOGoPermissions.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserDefaults.h>
#import <SoObjects/SOGo/NSArray+Utilities.h>
#import "UIxCalMainView.h"
#import <SOGo/SOGoUserSettings.h>
#import <Appointments/SOGoAppointmentFolder.h>
#import <Appointments/SOGoAppointmentFolders.h>
#import "UIxCalMainView.h"
@implementation UIxCalMainView

View File

@ -21,6 +21,7 @@
*/
#import <Foundation/NSArray.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSEnumerator.h>
#import <NGObjWeb/WORequest.h>
#import <SoObjects/SOGo/SOGoPermissions.h>

View File

@ -21,9 +21,6 @@
*/
#import <Foundation/Foundation.h>
#import <SOGo/NSArray+Utilities.h>
#import <SOGo/NSDictionary+Utilities.h>
#import <SOGo/NSString+Utilities.h>
#import <NGObjWeb/SoSecurityManager.h>
#import <NGObjWeb/SoUser.h>
@ -37,11 +34,15 @@
#import <NGCards/NGCards.h>
#import <Appointments/SOGoAppointmentFolder.h>
#import <Appointments/SOGoAppointmentFolders.h>
#import <Appointments/SOGoAppointmentObject.h>
#import <SOGo/NSArray+Utilities.h>
#import <SOGo/NSDictionary+Utilities.h>
#import <SOGo/NSString+Utilities.h>
#import <SOGo/SOGoObject.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserDefaults.h>
#import <SOGo/SOGoUserSettings.h>
#import <SOGoUI/SOGoAptFormatter.h>