+2007-10-31 Wolfgang Sourdeau <wsourdeau@inverse.ca>
+
+ * SoObjects/Mailer/SOGoMailFolder.[hm]: added a new subclass of
+ SOGoMailFolder: SOGoMailSpecialFolder.
+
+ * SoObjects/Mailer/SOGoMailAccount.m ([SOGoMailAccount
+ -traversalFromMailAccount]): overridden method that returns the
+ initialized mutable string.
+ ([SOGoMailAccount -allFolderPaths]): take the special folder paths
+ with -traversalFromMailAccount and reposition them at the
+ beginning of the list. By creating the special folders during that
+ request, we also make sure that the folder exists thanks to the
+ new initialisation method of the new "SOGoSpecialMailFolder"
+ class.
+ ([SOGoMailAccount -lookupSentFolder:_keyinContext:_ctx]): new
+ method.
+ ([SOGoMailAccount -lookupTrashFolder:_keyinContext:_ctx]): new
+ method.
+ ([SOGoMailAccount -lookupName:_keyinContext:acquire:_flag]): no
+ longer use lookupImap4Folder.
+ ([SOGoMailAccount -lookupImap4Folder:_keyinContext:_ctx]): removed
+ method.
+
+ * SoObjects/Mailer/SOGoMailBaseObject.m ([SOGoMailBaseObject
+ -traversalFromMailAccount]): new method that returns the full
+ IMAP4 path to the object.
+
+ * SoObjects/SOGo/SOGoUser.m ([SOGoUser +initialize]): retain
+ "superUsernames" after fetching it from the ud.
+
2007-10-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Scheduler/UIxCalListingActions.m ([UIxCalListingActions
case "$1" in
start)
echo -n $"Starting $DESC: "
- daemon su - sogo -c $DAEMON
+ for ((a=1; a <= PREFORK ; a++))
+ do
+ daemon su - sogo -c "$DAEMON $a"
+ done
# daemon --user sogo --pidfile $PIDFILE $DAEMON
echo "$NAME."
;;
stop)
echo -n $"Stopping $DESC: "
- killproc `basename $REAL_DAEMON` && rm -f $PIDFILE
+ killproc `basename $REAL_DAEMON` && rm -f ${PIDFILE}*
# killproc -p $PIDFILE $REAL_DAEMON && rm -f $PIDFILE
echo "$NAME."
;;
SOGoMailFolder.m \
SOGoSharedInboxFolder.m \
SOGoMailObject.m \
+ SOGoDraftObject.m \
SOGoMailObject+Draft.m \
+ SOGoSentFolder.m \
+ SOGoDraftsFolder.m \
SOGoTrashFolder.m \
\
SOGoMailBodyPart.m \
SOGoCalendarMailBodyPart.m \
SOGoVCardMailBodyPart.m \
\
- SOGoDraftsFolder.m \
- SOGoDraftObject.m \
- \
SOGoMailForward.m \
\
NSData+Mail.m \
@class SOGoDraftObject;
-@interface SOGoDraftsFolder : SOGoMailFolder
+@interface SOGoDraftsFolder : SOGoSpecialMailFolder
- (SOGoDraftObject *) newDraft;
- (BOOL) isInDraftsFolder;
#import <NGExtensions/NSNull+misc.h>
#import <NGImap4/NGImap4Connection.h>
+#import <SoObjects/SOGo/NSArray+Utilities.h>
#import <SoObjects/SOGo/SOGoUser.h>
#import "SOGoMailFolder.h"
[folders removeObjectsInArray: additionalFolders];
[folders addObjectsFromArray: additionalFolders];
}
-
+
return folders;
}
{
NSMutableArray *newFolders;
NSArray *rawFolders, *mainFolders;
+ NSString *realDraftsFolderName, *realSentFolderName, *realTrashFolderName;
- rawFolders = [[self imap4Connection]
- allFoldersForURL: [self imap4URL]];
+ rawFolders = [[self imap4Connection] allFoldersForURL: [self imap4URL]];
-#warning FIXME: the folder names should be prefixed
- mainFolders = [NSArray arrayWithObjects: inboxFolderName, draftsFolderName,
- sentFolder, trashFolder, nil];
+ realDraftsFolderName
+ = [[self draftsFolderInContext: context] traversalFromMailAccount];
+ realSentFolderName
+ = [[self sentFolderInContext: context] traversalFromMailAccount];
+ realTrashFolderName
+ = [[self trashFolderInContext: context] traversalFromMailAccount];
+
+ mainFolders = [NSArray arrayWithObjects: inboxFolderName,
+ realDraftsFolderName,
+ realSentFolderName,
+ realTrashFolderName, nil];
newFolders = [NSMutableArray arrayWithArray: rawFolders];
[newFolders removeObjectsInArray: mainFolders];
[newFolders sortUsingSelector: @selector (caseInsensitiveCompare:)];
return urlString;
}
+- (NSMutableString *) traversalFromMailAccount
+{
+ return [NSMutableString string];
+}
+
- (NSString *) imap4Login
{
return [[self imap4URL] user];
return folder;
}
-- (id) lookupImap4Folder: (NSString *) _key
- inContext: (id) _cx
+- (id) lookupSentFolder: (NSString *) _key
+ inContext: (id) _ctx
{
- NSString *s;
-
- s = [_key isEqualToString: [self trashFolderNameInContext:_cx]]
- ? @"SOGoTrashFolder" : @"SOGoMailFolder";
-
- return [self lookupFolder:_key ofClassNamed:s inContext:_cx];
+ return [self lookupFolder: _key ofClassNamed: @"SOGoSentFolder"
+ inContext: _ctx];
}
- (id) lookupDraftsFolder: (NSString *) _key
inContext: _ctx];
}
+- (id) lookupTrashFolder: (NSString *) _key
+ inContext: (id) _ctx
+{
+ return [self lookupFolder: _key ofClassNamed: @"SOGoTrashFolder"
+ inContext: _ctx];
+}
+
- (id) lookupFiltersFolder: (NSString *) _key inContext: (id) _ctx
{
return [self lookupFolder:_key ofClassNamed:@"SOGoSieveScriptsFolder"
{
// TODO: those should be product.plist bindings? (can't be class bindings
// though because they are 'per-account')
- if ([_key isEqualToString: [self draftsFolderNameInContext: _ctx]])
+ if ([_key isEqualToString: [self sentFolderNameInContext: _ctx]])
+ obj = [self lookupSentFolder: _key inContext: _ctx];
+ else if ([_key isEqualToString: [self draftsFolderNameInContext: _ctx]])
obj = [self lookupDraftsFolder: _key inContext: _ctx];
- else if ([_key isEqualToString: [self sieveFolderNameInContext: _ctx]])
- obj = [self lookupFiltersFolder: _key inContext: _ctx];
+ else if ([_key isEqualToString: [self trashFolderNameInContext: _ctx]])
+ obj = [self lookupTrashFolder: _key inContext: _ctx];
+// else if ([_key isEqualToString: [self sieveFolderNameInContext: _ctx]])
+// obj = [self lookupFiltersFolder: _key inContext: _ctx];
else
- obj = [self lookupImap4Folder: _key inContext: _ctx];
+ obj = [self lookupFolder: _key ofClassNamed: @"SOGoMailFolder"
+ inContext: _ctx];
}
else
obj = [super lookupName: _key inContext: _ctx acquire: NO];
- (NSString *) relativeImap4Name;
- (NSMutableString *) imap4URLString;
+- (NSMutableString *) traversalFromMailAccount;
- (NSURL *) imap4URL;
- (NSString *) imap4Login;
return [[self authenticatorInContext: context] passwordInContext: context];
}
+- (NSMutableString *) traversalFromMailAccount
+{
+ NSMutableString *currentTraversal;
+
+ currentTraversal = [container traversalFromMailAccount];
+ [currentTraversal appendFormat: @"/%@", [self relativeImap4Name]];
+
+ return currentTraversal;
+}
+
- (void)flushMailCaches {
[[self mailManager] flushCachesForURL:[self imap4URL]];
}
- (NSArray *) subfolders;
+- (BOOL) isSpecialFolder;
+
- (NSArray *) allFolderPaths;
- (NSArray *) allFolderURLs;
@end
+@interface SOGoSpecialMailFolder : SOGoMailFolder
+
+- (BOOL) isSpecialFolder;
+
+@end
+
#endif /* __Mailer_SOGoMailFolder_H__ */
return [[self imap4Connection] subfoldersForURL: [self imap4URL]];
}
+- (BOOL) isSpecialFolder
+{
+ return NO;
+}
+
- (NSArray *) allFolderPaths
{
NSMutableArray *deepSubfolders;
}
@end /* SOGoMailFolder */
+
+@implementation SOGoSpecialMailFolder
+
+- (id) initWithName: (NSString *) newName
+ inContainer: (id) newContainer
+{
+ if ((self = [super initWithName: newName
+ inContainer: newContainer]))
+ {
+ if (![[self imap4Connection] doesMailboxExistAtURL: [self imap4URL]])
+ [imap4 createMailbox: [self relativeImap4Name]
+ atURL: [newContainer imap4URL]];
+ }
+
+ return self;
+}
+
+- (BOOL) isSpecialFolder
+{
+ return YES;
+}
+
+@end
--- /dev/null
+/*
+ Copyright (C) 2005 SKYRIX Software AG
+
+ This file is part of OpenGroupware.org.
+
+ OGo is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with OGo; see the file COPYING. If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+*/
+
+#ifndef __Mailer_SOGoSentFolder_H__
+#define __Mailer_SOGoSentFolder_H__
+
+#import "SOGoMailFolder.h"
+
+@interface SOGoSentFolder : SOGoSpecialMailFolder
+@end
+
+#endif /* __Mailer_SOGoSentFolder_H__ */
--- /dev/null
+/*
+ Copyright (C) 2005 SKYRIX Software AG
+
+ This file is part of OpenGroupware.org.
+
+ OGo is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with OGo; see the file COPYING. If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+*/
+
+#import <Foundation/NSString.h>
+
+#import "SOGoSentFolder.h"
+
+@implementation SOGoSentFolder
+
+/* folder type */
+
+- (NSString *)outlookFolderClass {
+ return @"IPF.Sent";
+}
+
+@end /* SOGoSentFolder */
#import "SOGoMailFolder.h"
-@interface SOGoTrashFolder : SOGoMailFolder
+@interface SOGoTrashFolder : SOGoSpecialMailFolder
@end
#endif /* __Mailer_SOGoTrashFolder_H__ */
ASSIGN (defaultLanguage, @"English");
}
if (!superUsernames)
- {
- superUsernames = [ud arrayForKey: @"SOGoSuperUsernames"];
- }
+ ASSIGN (superUsernames, [ud arrayForKey: @"SOGoSuperUsernames"]);
acceptAnyUser = ([[ud stringForKey: @"SOGoAuthentificationMethod"]
isEqualToString: @"bypass"]);
"Address Book" = "Address Book";
"Mail" = "Mail";
"Preferences" = "Preferences";
-"Sign Out" = "Sign Out";
+"Disconnect" = "Disconnect";
"Right Administration" = "Right Administration";
"Log Console (dev.)" = "Log Console (dev.)";
"Address Book" = "Carnet d'adresses";
"Mail" = "Courrier";
"Preferences" = "Préférences";
-"Sign Out" = "Quitter";
+"Disconnect" = "Quitter";
"Right Administration" = "Partage";
"Log Console (dev.)" = "Journal (dév.)";
content = [NSMutableString string];
superContent = [[super flatContentAsString] stringByEscapingHTMLString];
[content appendString: [superContent stringByDetectingURLs]];
+ [content replaceString: @"\r\n" withString: @"<br />"];
+ [content replaceString: @"\n" withString: @"<br />"];
return content;
}
"title" = "SOGo";
-"Login:" = "Login:";
+"Username:" = "Username:";
"Password:" = "Password:";
"Connect" = "Connect";
"title" = "SOGo";
-"Login:" = "Nom d'utilisateur :";
+"Username:" = "Nom d'utilisateur :";
"Password:" = "Mot de passe :";
"Connect" = "Connexion";
<img id="splash" rsrc:src="lori-login.jpg"/><br/><br/>
<var:if condition="shortUserNameForDisplay" const:value="wrongusernamepassword"
><p class="error"><var:string label:value="Wrong username or password."/></p>
- </var:if><label><var:string label:value="Login:"/><br/>
+ </var:if><label><var:string label:value="Username:"/><br/>
<input class="textField" id="userName" name="userName"
type="text" var:value="userName" /></label><br/>
<label><var:string label:value="Password:"/><br/>
><div id="logConsole"><!-- space --></div></var:if>
<div id="linkBanner" class="linkbanner">
<a id="logoff" var:href="logoffPath"
- ><var:string label:value="Sign Out" /></a>
+ ><var:string label:value="Disconnect" /></a>
<a var:href="relativeCalendarPath"
><var:string label:value="Calendar" /></a> |
<a var:href="relativeContactsPath"