]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1065 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Tue, 15 May 2007 03:49:07 +0000 (03:49 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Tue, 15 May 2007 03:49:07 +0000 (03:49 +0000)
ChangeLog
SoObjects/Mailer/SOGoDraftObject.m
SoObjects/SOGo/SOGoObject.m
UI/Contacts/UIxContactFoldersView.m
UI/MainUI/SOGoUserHomePage.m
UI/Scheduler/UIxTimeDateControl.m
UI/Templates/MailerUI/UIxMailEditor.wox
UI/WebServerResources/generic.js

index fefc4345b506a5c82e9ff96fac1f9bcf22d9d6c1..9c1229d3a2e9208b34200cc86cce06e245e427dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-05-14  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
+
+       * SoObjects/Mailer/SOGoDraftObject.m ([NSString
+       -asQPSubjectString:encoding]): simplified method.
+       The headers indicates "utf-8" again thank to our fix in
+       sope-mime.
+
+       * SoObjects/SOGo/SOGoObject.m: fail to build if libFoundation is
+       being used.
+
 2007-05-11  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
 
        * UI/Common/UIxObjectActions.m ([UIxObjectActions
index c8791ed5b342b33c0f211db788414e9c406d1270..fb871988cc9b2f70c164471114f56a97e34731c2 100644 (file)
@@ -35,7 +35,7 @@
 #include <NGExtensions/NSFileManager+Extensions.h>
 #include "common.h"
 
-static NSString *contentTypeValue = @"text/plain; charset=iso-8859-1";
+static NSString *contentTypeValue = @"text/plain; charset=utf-8";
 
 @interface NSString (NGMimeHelpers)
 
@@ -48,23 +48,16 @@ static NSString *contentTypeValue = @"text/plain; charset=iso-8859-1";
 - (NSString *) asQPSubjectString: (NSString *) encoding;
 {
   NSString *qpString;
-  unsigned char *data, *dest;
-  unsigned int dataLen, destLen;
+  NSData *subjectData, *destSubjectData;
 
-  dataLen = [self length];
-  data = calloc(dataLen, sizeof (unsigned char*));
-  [self getCString: (char *) data];
+  subjectData = [self dataUsingEncoding: NSUTF8StringEncoding];
+  destSubjectData = [subjectData dataByEncodingQuotedPrintable];
 
-  destLen = dataLen * 3;
-  dest = calloc(dataLen * 3, sizeof (unsigned char*));
-  NGEncodeQuotedPrintableMime (data, dataLen, dest, destLen);
+  qpString = [[NSString alloc] initWithData: destSubjectData
+                              encoding: NSASCIIStringEncoding];
+  [qpString autorelease];
 
-  qpString = [NSString stringWithFormat: @"=?%@?Q?%s?=", encoding, dest];
-
-  free (data);
-  free (dest);
-
-  return qpString;
+  return [NSString stringWithFormat: @"=?%@?Q?%@?=", encoding, qpString];
 }
 
 @end
@@ -659,7 +652,7 @@ static NSString    *fromInternetSuffixPattern = nil;
   /* add subject */
   
   if ([(s = [lInfo objectForKey:@"subject"]) length] > 0)
-    [map setObject: [s asQPSubjectString: @"iso-8859-1"]
+    [map setObject: [s asQPSubjectString: @"utf-8"]
         forKey:@"subject"];
 //     [map setObject: [s asQPSubjectString: @"utf-8"] forKey:@"subject"];
   
index 1cfc050eb7365a6598014e956d9b61a2107b9a40..5a0e50159b06a27d82f4648075d607a005a159a9 100644 (file)
   02111-1307, USA.
 */
 
+#if LIB_FOUNDATION_LIBRARY
+#error SOGo won't work properly with libFoundation. Please use gnustep-base \
+       instead.
+#endif
+
 #import <NGObjWeb/WEClientCapabilities.h>
 #import <NGObjWeb/SoObject+SoDAV.h>
 #import <NGObjWeb/WOContext.h>
index 400eb6df205f8dba8d90ea7ec292f3efe7ad4d9c..a2af399e14780489ac6b2db52bbdfa78ef03df74 100644 (file)
                                     [contact objectForKey: @"cn"],
                                     [contact objectForKey: @"c_email"]];
          [response setStatus: 200];
-         [response setHeader: @"text/plain; charset=iso-8859-1"
-                   forKey: @"Content-Type"];
+//       [response setHeader: @"text/plain; charset=iso-8859-1"
+//                 forKey: @"Content-Type"];
          [response appendContentString: responseString];
          contact = [contacts nextObject];
        }
index 65833f8872f9155f58f51153626b6a8bd7bebe40..3b54ade19a60315619c039f9093ff7fd89985dfe 100644 (file)
 
   response = [context response];
   [response setStatus: 200];
-  [response setHeader: @"text/plain; charset=iso-8859-1"
-            forKey: @"Content-Type"];
+//   [response setHeader: @"text/plain; charset=iso-8859-1"
+//             forKey: @"Content-Type"];
   [response appendContentString: [self _freeBusyAsText]];
 
   return response;
index e8b84a399a9e8883adf173a1fd92db792783b70c..c36b853852341cc3d05d7c7b8fadb653009d5bbc 100644 (file)
@@ -18,7 +18,6 @@
   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
 */
-// $Id$
 
 #import <Foundation/NSArray.h>
 #import <Foundation/NSString.h>
index 213e48b0187681f5e14b1d6b17d0674c91d141c8..709379cffccc5fad697630d3dc151f291038feea 100644 (file)
@@ -41,7 +41,7 @@
               /></span></div>
       </div>
     <!-- separator line -->
-      <textarea name="content" var:value="text" />
+      <textarea name="text" var:value="text" />
     <!-- img rsrc:src="tbird_073_compose.png" alt="screenshot" / -->
     </form>
   </var:component>
index 89cce21d5d12a715159f04f15c3096c9f9eb87e9..e343942892c9e29496509922763b4932fd6789b3 100644 (file)
@@ -144,26 +144,29 @@ function extractEmailAddress(mailTo) {
 function extractEmailName(mailTo) {
   var emailName = "";
 
-  var emailNamere = /(.+)\ </;
-  if (emailNamere.test(mailTo)) {
-    emailNamere.exec(mailTo);
-    emailName = RegExp.$1;
-  }
+   var tmpMailTo = mailTo.replace("&lt;", "<");
+   tmpMailTo = tmpMailTo.replace("&gt;", ">");
 
-  return emailName;
+   var emailNamere = /([       ]+)?(.+)\ </;
+   if (emailNamere.test(tmpMailTo)) {
+      emailNamere.exec(tmpMailTo);
+      emailName = RegExp.$2;
+   }
+   
+   return emailName;
 }
 
 function sanitizeMailTo(dirtyMailTo) {
-  var emailName = extractEmailName(dirtyMailTo);
-  var email = "" + extractEmailAddress(dirtyMailTo);
-
-  var mailto = "";
-  if (emailName && emailName.length > 0)
-    mailto = emailName + ' <' + email + '>';
-  else
-    mailto = email;
+   var emailName = extractEmailName(dirtyMailTo);
+   var email = "" + extractEmailAddress(dirtyMailTo);
+   
+   var mailto = "";
+   if (emailName && emailName.length > 0)
+      mailto = emailName + ' <' + email + '>';
+   else
+      mailto = email;
 
-  return mailto;
+   return mailto;
 }
 
 function openUserFolderSelector(callback, type) {
@@ -189,12 +192,11 @@ function openMailComposeWindow(url) {
   return w;
 }
 
-function openMailTo(senderMailto) {
-  var mailto = sanitizeMailTo(senderMailto);
-
-  if (mailto.length > 0)
-    openMailComposeWindow(ApplicationBaseURL
-                          + "/../Mail/compose?mailto=" + mailto);
+function openMailTo(senderMailTo) {
+   var mailto = sanitizeMailTo(senderMailTo);
+   if (mailto.length > 0)
+      openMailComposeWindow(ApplicationBaseURL
+                           + "/../Mail/compose?mailto=" + mailto);
 
   return false; /* stop following the link */
 }