Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Mobility

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
LinkBack Thread Tools Search this Thread Display Modes
  #41 (permalink)  
Old 03-07-2010, 03:44 PM
Starter Member
 
Posts: 2
Default

The latest version Revision 22 works good now!
Reply With Quote
  #42 (permalink)  
Old 03-08-2010, 12:27 AM
Intermediate Member
 
Posts: 20
Thumbs up

Quote:
Originally Posted by megaman5 View Post
The latest version Revision 22 works good now!
I agree, v22 works very well.
Only the äöüß problem is still there but maybe it has nothing to do with zimbrabackend.

//carlsan
Reply With Quote
  #43 (permalink)  
Old 03-09-2010, 04:19 AM
New Member
 
Posts: 3
Default

Quote:
Originally Posted by gnosbush View Post
I started a project on SourceForge to create a complete backend for Zimbra on Z-Push. So far I have a pretty decent start on it but could use help if anyone has PHP experience and is somewhat familar with the Zimbra SOAP calls (although you can really pick up on these pretty quickly). I will also need testers. Send me a message if interested.

The project on SF is located at Z-Push Zimbra Backend
Hi, we are a little group of freelancer we have a good experience in php ? What is the actual stade of the project and what do you need excatly ?

One of our customer have accepted to test Z-PUSH+OSE+BSEX could you provide us and/or recommand with an efficient howto ?
Reply With Quote
  #44 (permalink)  
Old 03-11-2010, 11:38 AM
Moderator
 
Posts: 2,207
Default

Here's a patch against version 23 that allows "accented" characters (éàäöüß etc) to work in Mails, Contacts and Calendar.

This was tested against ZCS OSE 6.0.4, iPhone 3GS 3.1.2 (french) and WM 6.1 (french, running on a Samsung i780).

Quick how to for the diff :
. go to z-push/backend directory
. cut/past below code to diff.txt
. copy zimbra.php to zimbra.php.old (to have a backup)
. patch zimbra.php < diff.txt

Code:
--- zimbra.php.old	2010-03-11 19:00:18.000000000 +0100
+++ zimbra.php	2010-03-11 19:50:27.000000000 +0100
@@ -936,7 +936,7 @@
                     //$body = $this->GetBody($message);
 
 					// decode body to truncate it
-                    $body = utf8_to_windows1252($this->getBody($message, $this->_useHTML));
+                    $body = u2w($this->getBody($message, $this->_useHTML));
                     if(strlen($body) > $truncsize && $truncsize <> 0) {
                         $body = substr($body, 0, $truncsize);
                         $output->bodytruncated = 1;
@@ -944,7 +944,7 @@
                         $body = $body;
                         $output->bodytruncated = 0;
                     }
-                    $body = str_replace("\n","\r\n", windows1252_to_utf8(str_replace("\r","",$body)));
+                    $body = str_replace("\n","\r\n", w2u(str_replace("\r","",$body)));
                     $output->bodysize = strlen($body);
                     $output->body = $body;
 
@@ -1017,7 +1017,7 @@
                                     $image = $this->url2base64($this->_rest_url . '/?id='.$item['id'].'&part='.$item['a_attribute_part'][0]);
                                     $output->$k = $image;
                                 } else {
-                                    $output->$k = w2u($item['a'][$param[$v]]);
+                                    $output->$k = $item['a'][$param[$v]];
                                 }
 
                             } else {
@@ -1063,11 +1063,11 @@
 
                         // title
                         if(isset($item['inv'][$i]['comp'][0]['name'])) {
-                            $subApp->subject = w2u($item['inv'][$i]['comp'][0]['name']);
+                            $subApp->subject = $item['inv'][$i]['comp'][0]['name'];
                         }
 
                         if(isset($item['inv'][$i]['comp'][0]['loc'])) {
-                            $subApp->location = w2u($item['inv'][$i]['comp'][0]['loc']);
+                            $subApp->location = $item['inv'][$i]['comp'][0]['loc'];
                         }
 
                         // allday
@@ -1120,7 +1120,7 @@
                             $subApp->sensitivity = 0;
                         }
 
-                        $subApp->body = w2u($item['inv'][$i]['comp'][0]['desc'][0]);
+                        $subApp->body = $item['inv'][$i]['comp'][0]['desc'][0];
                         $subApp->bodytruncated = 0;
 
                         // Reminder
@@ -1129,8 +1129,8 @@
                         }
 
                         // Organizer Name & Email
-                        $subApp->organizername = w2u($item['inv'][$i]['comp'][0]['or_attribute_d'][0]);
-                        $subApp->organizeremail = w2u($item['inv'][$i]['comp'][0]['or_attribute_a'][0]);
+                        $subApp->organizername = $item['inv'][$i]['comp'][0]['or_attribute_d'][0];
+                        $subApp->organizeremail = $item['inv'][$i]['comp'][0]['or_attribute_a'][0];
 
                         // Attendees
                         $cAttendees = count($item['inv'][$i]['comp'][0]['at_attribute_a']);
@@ -1141,9 +1141,9 @@
                                 $attendee = new SyncAttendee();
 
                                 if(isset($item['inv'][$i]['comp'][0]['at_attribute_d'][$i])) {
-                                    $attendee->name = w2u($item['inv'][$i]['comp'][0]['at_attribute_d'][$i]);
+                                    $attendee->name = $item['inv'][$i]['comp'][0]['at_attribute_d'][$i];
                                 } else {
-                                    $attendee->name = w2u($item['inv'][$i]['comp'][0]['at_attribute_a'][$i]);
+                                    $attendee->name = $item['inv'][$i]['comp'][0]['at_attribute_a'][$i];
                                 }
 
                                 $attendee->email = $item['inv'][$i]['comp'][0]['at_attribute_a'][$i];
@@ -1627,12 +1627,12 @@
 
                 // subject
                 if(isset($input->subject)) {
-                    $soap .= 'name="'.w2u($input->subject).'" ';
+                    $soap .= 'name="'.$input->subject.'" ';
                 }
 
                 // location
                 if(isset($input->location)) {
-                    $soap .= 'loc="'.w2u($input->location).'" ';
+                    $soap .= 'loc="'.$input->location.'" ';
                 }
 
                 // close <comp ... >
@@ -1772,7 +1772,7 @@
                 $soap .= '</comp></inv>';
 
                 //subject
-                $soap .= '<su>'.w2u($input->subject).'</su>';
+                $soap .= '<su>'.$input->subject.'</su>';
 
                 //currently not used|/
                 $soap .= '<mp ct="multipart/alternative">
Reply With Quote
  #45 (permalink)  
Old 03-11-2010, 01:15 PM
Special Member
 
Posts: 104
Default

I Can't figure out why
1. Can not send email
2. After initial contact sync, no more contact syncing
3. After intial calendar sync, no more calendar syncing

I am using a palm pre w/ EAS / webos 1.4

here is a copy of my debug log when I force a sync on my phone.

Code:
03/11/10 16:30:21 [15898] --------
03/11/10 16:30:23 [15892] Start
03/11/10 16:30:23 [15892] Z-Push version: SVN 1.3 RC2 276
03/11/10 16:30:23 [15892] Client IP: 206.47.xxx.xxx
03/11/10 16:30:23 [15892] Client supports version 2.5
03/11/10 16:30:23 [15892] START Logon { username = xxxxxxxx@xxxx.com; domain = ; password = <hidden> }
03/11/10 16:30:23 [15892] SOAP message:<textarea><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
                            <soap:Header><context xmlns="urn:zimbra"/></soap:Header>
                            <soap:Body><AuthRequest xmlns="urn:zimbraAccount">
                        <account by="name">xxxxxxxx@xxxx.com</account>
                        <password>xxxxxxxx</password>
                    </AuthRequest></soap:Body>
                        </soap:Envelope></textarea>
03/11/10 16:30:23 [15892] SOAP response:<textarea><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><context xmlns="urn:zimbra"><change token="36155"/></context></soap:Header><soap:Body><AuthResponse xmlns="urn:zimbraAccount"><authToken>0_35e008062f911f1c9f9e2a84937dd4e8aa7e7851_69643d33363a38343462323937652d383630612d343664392d383064382d3865323831656661623532303b6578703d31333a313236383531323935323634353b747970653d363a7a696d6272613b</authToken><lifetime>172799998</lifetime><skin>waves</skin></AuthResponse></soap:Body></soap:Envelope></textarea><br/><br/>
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:2533 Undefined index:  soap:Envelope (8)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:2533 Undefined index:  soap:Header (8)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:2533 Undefined index:  context (8)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:2481 Undefined index:  value (8)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:2533 Undefined index:  change (8)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:2533 Undefined index:  change_attribute_token (8)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:2533 Undefined index:  soap:Body (8)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:2533 Undefined index:  AuthResponse (8)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:2533 Undefined index:  authToken (8)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:2533 Undefined index:  lifetime (8)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:2533 Undefined index:  skin (8)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:146 Undefined index:  refresh (8)
03/11/10 16:30:23 [15892] END Logon { connected = true }
03/11/10 16:30:23 [15892] START Setup { user = xxxxxxxx@xxxx.com; devid = PALM40e1a867733015c6fdca990d179c; protocolversion = 2.5 }
03/11/10 16:30:23 [15892] SOAP message:<textarea><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
                            <soap:Header><context xmlns="urn:zimbra">
                            <authToken>0_35e008062f911f1c9f9e2a84937dd4e8aa7e7851_69643d33363a38343462323937652d383630612d343664392d383064382d3865323831656661623532303b6578703d31333a313236383531323935323634353b747970653d363a7a696d6272613b</authToken>
                            <sessionId id=""></sessionId>
                        </context></soap:Header>
                            <soap:Body><GetFolderRequest xmlns="urn:zimbraMail" visible="1">
                    <folder/>
                </GetFolderRequest></soap:Body>
                        </soap:Envelope></textarea>
03/11/10 16:30:23 [15892] SOAP response:<textarea><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><context xmlns="urn:zimbra"><change token="36155"/></context></soap:Header><soap:Body><GetFolderResponse xmlns="urn:zimbraMail"><folder id="1" rev="1" i4next="2" s="0" i4ms="1" ms="1" name="USER_ROOT" n="0" l="11"><folder id="2360" rev="18201" i4next="5249" s="2505275" color="8" i4ms="33209" ms="30303" name="XXXX dot COM" n="17" rgb="#D3D3D3" l="1"/><folder id="5216" rev="33003" i4next="5258" s="3948" i4ms="33236" ms="33003" name="Accounts @ XXXX" n="2" l="1"/><folder f="u" rev="26112" i4next="5619" i4ms="35960" ms="30304" n="27" l="1" rgb="#FC9696" id="3380" u="22" s="12788940" color="5" name="Admin @ XXXX"/><folder id="2385" rev="18338" i4next="5085" s="11459816" color="4" i4ms="31897" ms="30302" name="AFI" n="182" rgb="#BA86E5" l="1"/><link id="3129" rev="24593" rid="10" color="7" zid="0e665a25-23b8-4f15-a77a-6ff4e5201ed4" ms="34264" name="Anita's Calendar" owner="adaigneault@mail.xxxx.com" rgb="#FE9BD3" l="1" view="appointment"/><folder id="16" rev="1" i4next="5146" s="14196505" i4ms="32317" ms="1" name="Briefcase" n="23" l="1" view="document"><folder f="i" rev="17872" i4next="5552" i4ms="35600" ms="30301" n="9" l="16" rgb="#BA86E5" id="2288" s="3403394" color="4" name="Public" view="document"><acl><grant gt="pub" perm="r"/></acl></folder></folder><folder f="#" id="10" rev="1" i4next="5400" s="81805" i4ms="35111" ms="30404" name="Calendar" n="19" l="1" view="appointment"/><folder id="14" rev="1" i4next="15" s="0" i4ms="1" ms="1" name="Chats" n="0" l="1" view="message"/><folder id="7" rev="1" i4next="5623" s="0" i4ms="35977" ms="1" name="Contacts" n="33" l="1" view="contact"/><folder id="6" rev="1" i4next="5630" s="11754" i4ms="35993" ms="1" name="Drafts" n="50" l="1" view="message"/><folder id="13" rev="1" i4next="5481" s="0" i4ms="35669" ms="1" name="Emailed Contacts" n="179" l="1" view="contact"/><folder id="257" rev="2" i4next="1019" s="2033611" i4ms="674" ms="4" name="Hurricanes" n="34" l="1" view="message"/><folder id="2" rev="1" i4next="5642" s="80488866" i4ms="36129" ms="1" name="Inbox" n="1149" l="1" view="message"/><folder id="4" rev="1" i4next="2349" s="0" i4ms="18089" ms="1" name="Junk" n="0" l="1" view="message"/><folder f="*" id="258" rev="5" i4next="259" s="0" i4ms="5" ms="7" name="Junk E-mail" n="0" l="1" view="message"/><folder id="12" rev="1" i4next="3207" s="53878" i4ms="25404" ms="1" name="Notebook" n="3" l="1" view="wiki"/><folder id="5" rev="1" i4next="5641" s="40658705" i4ms="36125" ms="1" name="Sent" n="953" l="1" view="message"/><folder f="#" id="15" rev="1" i4next="5228" s="23292" i4ms="33057" ms="1" name="Tasks" n="12" l="1" view="task"/><folder id="3" rev="1" i4next="5578" s="321193702" i4ms="35665" ms="1" name="Trash" n="1297" l="1"/></folder></GetFolderResponse></soap:Body></soap:Envelope></textarea><br/><br/>
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:2500 Undefined index:  attributes (8)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:2500 Undefined index:  attributes (8)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:2500 Undefined index:  attributes (8)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:202 Undefined index:  view (8)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:278 Undefined index:  11 (8)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:208 Undefined index:  11 (8)
03/11/10 16:30:23 [15892] [0] 1; name=USER_ROOT; view=message; include=0; virtual=0
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:202 Undefined index:  view (8)
03/11/10 16:30:23 [15892] [1] 2360; name=XXXX dot COM; view=message; include=1; virtual=0
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:202 Undefined index:  view (8)
03/11/10 16:30:23 [15892] [2] 5216; name=Accounts @ XXXX; view=message; include=1; virtual=0
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:202 Undefined index:  view (8)
03/11/10 16:30:23 [15892] [3] 3380; name=Admin @ XXXX; view=message; include=1; virtual=0
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:202 Undefined index:  view (8)
03/11/10 16:30:23 [15892] [4] 2385; name=AFI; view=message; include=1; virtual=0
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] [5] 16; name=Briefcase; view=document; include=0; virtual=0
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] [6] 2288; name=Public; view=document; include=0; virtual=0
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] [7] 10; name=Calendar; view=appointment; include=1; virtual=0
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] [8] 14; name=Chats; view=message; include=1; virtual=0
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] [9] 7; name=Contacts; view=contact; include=1; virtual=0
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] [10] 6; name=Drafts; view=message; include=1; virtual=0
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] [11] 13; name=Emailed Contacts; view=contact; include=0; virtual=0
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] [12] 257; name=Hurricanes; view=message; include=1; virtual=0
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] [13] 2; name=Inbox; view=message; include=1; virtual=0
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] [14] 4; name=Junk; view=message; include=1; virtual=0
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] [15] 258; name=Junk E-mail; view=message; include=1; virtual=0
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] [16] 12; name=Notebook; view=wiki; include=0; virtual=0
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] [17] 5; name=Sent; view=message; include=1; virtual=0
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] [18] 15; name=Tasks; view=task; include=0; virtual=0
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:199 Creating default object from empty value (2048)
03/11/10 16:30:23 [15892] /var/www/z-push/backend/zimbra.php:202 Undefined index:  view (8)
03/11/10 16:30:23 [15892] [19] 3; name=Trash; view=message; include=1; virtual=0
03/11/10 16:30:23 [15892] END Setup { 20 Folders Loaded }
03/11/10 16:30:23 [15892] POST cmd: GetAttachment
03/11/10 16:30:23 [15892] START GetAttachmentData { attname = '2:5587:4' }
03/11/10 16:30:25 [15892] END GetAttachmentData { true }
03/11/10 16:30:26 [15892] START Logoff
03/11/10 16:30:26 [15892] SOAP message:<textarea><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
                            <soap:Header><context xmlns="urn:zimbra">
                            <authToken>0_35e008062f911f1c9f9e2a84937dd4e8aa7e7851_69643d33363a38343462323937652d383630612d343664392d383064382d3865323831656661623532303b6578703d31333a313236383531323935323634353b747970653d363a7a696d6272613b</authToken>
                            <sessionId id=""></sessionId>
                        </context></soap:Header>
                            <soap:Body><EndSessionRequest xmlns="urn:zimbraAccount"/></soap:Body>
                        </soap:Envelope></textarea>
03/11/10 16:30:26 [15892] SOAP response:<textarea><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><context xmlns="urn:zimbra"><change token="36155"/></context></soap:Header><soap:Body><EndSessionResponse xmlns="urn:zimbraAccount"/></soap:Body></soap:Envelope></textarea><br/><br/>
03/11/10 16:30:26 [15892] END Logoff
03/11/10 16:30:26 [15892] end
I am at z-push revision 23
__________________
Guest Ubuntu 10.04LTS x64 and Zimbra 7.1.3 w/ 7.1.3 patch
Host CentOS 6.2 x64 :: KVM :: LVM :: Hardware RAID
Reply With Quote
  #46 (permalink)  
Old 03-11-2010, 01:20 PM
Intermediate Member
 
Posts: 20
Default

Quote:
Originally Posted by Klug View Post
Here's a patch against version 23 that allows "accented" characters (éàäöüß etc) to work in Mails, Contacts and Calendar.
Shure you used v23? For me that diff.txt did not work.
BUT: I did the changes manually (to v23) and it works great! Is there any disadvantage if the changes come in the standard?

Greetings,
carlsan
Reply With Quote
  #47 (permalink)  
Old 03-11-2010, 01:42 PM
Active Member
 
Posts: 38
Default

Quote:
Originally Posted by powrrrplay View Post
here is a copy of my debug log when I force a sync on my phone.
Is this your entire debug log? From what you posted, it just looks like the phone requested to get an attachment, not a full sync.
Reply With Quote
  #48 (permalink)  
Old 03-11-2010, 01:46 PM
Active Member
 
Posts: 38
Default

Quote:
Originally Posted by carlsan View Post
Is there any disadvantage if the changes come in the standard?
Nope, the plan is to add them to the standard code. Klug has graciously agreed to do that for me.

Thank you Klug for researching and coming up with a solution to this problem.
Reply With Quote
  #49 (permalink)  
Old 03-11-2010, 03:24 PM
Special Member
 
Posts: 104
Default

Quote:
Originally Posted by gnosbush View Post
Is this your entire debug log? From what you posted, it just looks like the phone requested to get an attachment, not a full sync.
There is thousands of more lines to the debug log... shall i post all of it?
__________________
Guest Ubuntu 10.04LTS x64 and Zimbra 7.1.3 w/ 7.1.3 patch
Host CentOS 6.2 x64 :: KVM :: LVM :: Hardware RAID
Reply With Quote
  #50 (permalink)  
Old 03-11-2010, 10:35 PM
New Member
 
Posts: 3
Default

Quote:
Originally Posted by Klug View Post
Here's a patch against version 23 that allows "accented" characters (éàäöüß etc) to work in Mails, Contacts and Calendar.

This was tested against ZCS OSE 6.0.4, iPhone 3GS 3.1.2 (french) and WM 6.1 (french, running on a Samsung i780).

Quick how to for the diff :
. go to z-push/backend directory
. cut/past below code to diff.txt
. copy zimbra.php to zimbra.php.old (to have a backup)
. patch zimbra.php < diff.txt

Code:
--- zimbra.php.old	2010-03-11 19:00:18.000000000 +0100
+++ zimbra.php	2010-03-11 19:50:27.000000000 +0100
@@ -936,7 +936,7 @@
                     //$body = $this->GetBody($message);
 
 					// decode body to truncate it
-                    $body = utf8_to_windows1252($this->getBody($message, $this->_useHTML));
+                    $body = u2w($this->getBody($message, $this->_useHTML));
                     if(strlen($body) > $truncsize && $truncsize <> 0) {
                         $body = substr($body, 0, $truncsize);
                         $output->bodytruncated = 1;
@@ -944,7 +944,7 @@
                         $body = $body;
                         $output->bodytruncated = 0;
                     }
-                    $body = str_replace("\n","\r\n", windows1252_to_utf8(str_replace("\r","",$body)));
+                    $body = str_replace("\n","\r\n", w2u(str_replace("\r","",$body)));
                     $output->bodysize = strlen($body);
                     $output->body = $body;
 
@@ -1017,7 +1017,7 @@
                                     $image = $this->url2base64($this->_rest_url . '/?id='.$item['id'].'&part='.$item['a_attribute_part'][0]);
                                     $output->$k = $image;
                                 } else {
-                                    $output->$k = w2u($item['a'][$param[$v]]);
+                                    $output->$k = $item['a'][$param[$v]];
                                 }
 
                             } else {
@@ -1063,11 +1063,11 @@
 
                         // title
                         if(isset($item['inv'][$i]['comp'][0]['name'])) {
-                            $subApp->subject = w2u($item['inv'][$i]['comp'][0]['name']);
+                            $subApp->subject = $item['inv'][$i]['comp'][0]['name'];
                         }
 
                         if(isset($item['inv'][$i]['comp'][0]['loc'])) {
-                            $subApp->location = w2u($item['inv'][$i]['comp'][0]['loc']);
+                            $subApp->location = $item['inv'][$i]['comp'][0]['loc'];
                         }
 
                         // allday
@@ -1120,7 +1120,7 @@
                             $subApp->sensitivity = 0;
                         }
 
-                        $subApp->body = w2u($item['inv'][$i]['comp'][0]['desc'][0]);
+                        $subApp->body = $item['inv'][$i]['comp'][0]['desc'][0];
                         $subApp->bodytruncated = 0;
 
                         // Reminder
@@ -1129,8 +1129,8 @@
                         }
 
                         // Organizer Name & Email
-                        $subApp->organizername = w2u($item['inv'][$i]['comp'][0]['or_attribute_d'][0]);
-                        $subApp->organizeremail = w2u($item['inv'][$i]['comp'][0]['or_attribute_a'][0]);
+                        $subApp->organizername = $item['inv'][$i]['comp'][0]['or_attribute_d'][0];
+                        $subApp->organizeremail = $item['inv'][$i]['comp'][0]['or_attribute_a'][0];
 
                         // Attendees
                         $cAttendees = count($item['inv'][$i]['comp'][0]['at_attribute_a']);
@@ -1141,9 +1141,9 @@
                                 $attendee = new SyncAttendee();
 
                                 if(isset($item['inv'][$i]['comp'][0]['at_attribute_d'][$i])) {
-                                    $attendee->name = w2u($item['inv'][$i]['comp'][0]['at_attribute_d'][$i]);
+                                    $attendee->name = $item['inv'][$i]['comp'][0]['at_attribute_d'][$i];
                                 } else {
-                                    $attendee->name = w2u($item['inv'][$i]['comp'][0]['at_attribute_a'][$i]);
+                                    $attendee->name = $item['inv'][$i]['comp'][0]['at_attribute_a'][$i];
                                 }
 
                                 $attendee->email = $item['inv'][$i]['comp'][0]['at_attribute_a'][$i];
@@ -1627,12 +1627,12 @@
 
                 // subject
                 if(isset($input->subject)) {
-                    $soap .= 'name="'.w2u($input->subject).'" ';
+                    $soap .= 'name="'.$input->subject.'" ';
                 }
 
                 // location
                 if(isset($input->location)) {
-                    $soap .= 'loc="'.w2u($input->location).'" ';
+                    $soap .= 'loc="'.$input->location.'" ';
                 }
 
                 // close <comp ... >
@@ -1772,7 +1772,7 @@
                 $soap .= '</comp></inv>';
 
                 //subject
-                $soap .= '<su>'.w2u($input->subject).'</su>';
+                $soap .= '<su>'.$input->subject.'</su>';
 
                 //currently not used|/
                 $soap .= '<mp ct="multipart/alternative">
Hi Kulg, thank you very much for this patch.
What I would like to know is : Is there anyone who have tested ZIMBRA OSE+Z-PUSH+Black Berry ? If yes how ?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.