From 3c87adeda5496837b27d93a163f2092873bfaedc Mon Sep 17 00:00:00 2001 From: polytan02 Date: Fri, 14 Aug 2015 17:15:16 +0100 Subject: [PATCH] Update to latest sources --- sources/INSTALL_UPDATE_FROM_GIT | 21 +++++++++++++++++++++ sources/backend/zarafa/mapiprovider.php | 9 +++++++++ sources/lib/core/synccollections.php | 22 +++++++++++++--------- sources/lib/wbxml/wbxmldecoder.php | 10 ++++++++++ sources/version.php | 2 +- 5 files changed, 54 insertions(+), 10 deletions(-) create mode 100644 sources/INSTALL_UPDATE_FROM_GIT diff --git a/sources/INSTALL_UPDATE_FROM_GIT b/sources/INSTALL_UPDATE_FROM_GIT new file mode 100644 index 0000000..01f3cd5 --- /dev/null +++ b/sources/INSTALL_UPDATE_FROM_GIT @@ -0,0 +1,21 @@ +Installing and updating from GIT can be time consuming, because we will have conflicts +with the config.php files. +Until upstream finds a good solution we can use this trick: + + +Setup + + Clone the repository to your web server + git checkout -b config to create the new config branch with the local configuration + +Updating + + Backup the local repository (or even better: also do this on a non-live copy) + git checkout master + git pull origin master to update the local master branch + git checkout config + git rebase master to rebase the offline config branch + Solve the conflicts (which will occur if the configuration files have been changed in the master) + + +Instructions provided by Martin Porcheron (@mporcheron) diff --git a/sources/backend/zarafa/mapiprovider.php b/sources/backend/zarafa/mapiprovider.php index 7e90402..6664cb3 100644 --- a/sources/backend/zarafa/mapiprovider.php +++ b/sources/backend/zarafa/mapiprovider.php @@ -792,6 +792,15 @@ class MAPIProvider { $message->lastverbexecuted = Utils::GetLastVerbExecuted($message->lastverbexecuted); } + // OL 2013 doesn't show sender and subject for signed emails because the headers are missing + if(isset($message->messageclass) && strpos($message->messageclass, "IPM.Note.SMIME.MultipartSigned") === 0 && + isset($message->asbody->type) && $message->asbody->type == SYNC_BODYPREFERENCE_MIME) { + ZLog::Write(LOGLEVEL_DEBUG, "Attach the transport message headers to a signed message"); + $transportHeaders = array(PR_TRANSPORT_MESSAGE_HEADERS_W); + $messageHeaders = $this->getProps($mapimessage, $transportHeaders); + $message->asbody->data = $messageHeaders[PR_TRANSPORT_MESSAGE_HEADERS] ."\r\n\r\n" . $message->asbody->data; + } + return $message; } diff --git a/sources/lib/core/synccollections.php b/sources/lib/core/synccollections.php index fada0a9..e3cf545 100644 --- a/sources/lib/core/synccollections.php +++ b/sources/lib/core/synccollections.php @@ -506,15 +506,19 @@ class SyncCollections implements Iterator { $validNotifications = false; foreach ($notifications as $folderid) { - // check if the notification on the folder is within our filter - if ($this->CountChange($folderid)) { - ZLog::Write(LOGLEVEL_DEBUG, sprintf("SyncCollections->CheckForChanges(): Notification received on folder '%s'", $folderid)); - $validNotifications = true; - $this->waitingTime = time()-$started; - } - else { - ZLog::Write(LOGLEVEL_DEBUG, sprintf("SyncCollections->CheckForChanges(): Notification received on folder '%s', but it is not relevant", $folderid)); - } + // ZP-631 - temporary disable checking validity of notifications + // notify mobile for all received notifications + $this->changes[$folderid] = 1; + $validNotifications = true; +// // check if the notification on the folder is within our filter +// if ($this->CountChange($folderid)) { +// ZLog::Write(LOGLEVEL_DEBUG, sprintf("SyncCollections->CheckForChanges(): Notification received on folder '%s'", $folderid)); +// $validNotifications = true; +// $this->waitingTime = time()-$started; +// } +// else { +// ZLog::Write(LOGLEVEL_DEBUG, sprintf("SyncCollections->CheckForChanges(): Notification received on folder '%s', but it is not relevant", $folderid)); +// } } if ($validNotifications) return true; diff --git a/sources/lib/wbxml/wbxmldecoder.php b/sources/lib/wbxml/wbxmldecoder.php index 5c22148..af356d0 100644 --- a/sources/lib/wbxml/wbxmldecoder.php +++ b/sources/lib/wbxml/wbxmldecoder.php @@ -233,6 +233,16 @@ class WBXMLDecoder extends WBXMLDefs { return $this->isWBXML; } + /** + * Reads the remaning data from the input stream + * + * @access public + * @return void + */ + public function readRemainingData() { + ZLog::Write(LOGLEVEL_DEBUG, "WBXMLDecoder->readRemainingData() reading remaining data from input stream"); + while ($this->getElement()); + } /** * Returns the WBXML data read from the stream diff --git a/sources/version.php b/sources/version.php index 9af2e33..485994b 100644 --- a/sources/version.php +++ b/sources/version.php @@ -42,4 +42,4 @@ ************************************************/ -define("ZPUSH_VERSION", "SVN-trunk-r1975"); +define("ZPUSH_VERSION", "SVN-trunk-r1981");