Commit 0b040fbc authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #343 in ZP/z-push from develop to release/2.3

* commit '054390f0':
  ZP-1022 Fixed example configurations.
  ZP-1021 Return SYNC_BODYPREFERENCE_PLAIN when $bpTypes is false in GetBodyPreferenceBestMatch.
  ZP-1020 Appointments as meetings on android devices.
parents 914086fd 054390f0
......@@ -316,6 +316,20 @@ class MAPIProvider {
$message->responsetype = $messageprops[$appointmentprops["responsestatus"]];
}
// If it's an appointment which doesn't have any attendees, we have to make sure that
// the user is the owner or it will not work properly with android devices
// @see https://jira.z-hub.io/browse/ZP-1020
if(isset($messageprops[$appointmentprops["meetingstatus"]]) && $messageprops[$appointmentprops["meetingstatus"]] == olNonMeeting && empty($message->attendees)) {
$meinfo = mapi_zarafa_getuser_by_name($this->store, Request::GetAuthUser());
if (is_array($meinfo)) {
$message->organizeremail = w2u($meinfo["emailaddress"]);
$message->organizername = w2u($meinfo["fullname"]);
ZLog::Write(LOGLEVEL_DEBUG, "MAPIProvider->getAppointment(): setting ourself as the organizer for an appointment without attendees.");
}
}
if (!isset($message->nativebodytype)) $message->nativebodytype = $this->getNativeBodyType($messageprops);
// If the user is working from a location other than the office the busystatus should be interpreted as free.
......
......@@ -865,6 +865,9 @@ class Utils {
* @return int
*/
public static function GetBodyPreferenceBestMatch($bpTypes) {
if ($bpTypes === false) {
return SYNC_BODYPREFERENCE_PLAIN;
}
// The best choice is RTF, then HTML and then MIME in order to save bandwidth
// because MIME is a complete message including the headers and attachments
if (in_array(SYNC_BODYPREFERENCE_RTF, $bpTypes)) return SYNC_BODYPREFERENCE_RTF;
......
......@@ -60,11 +60,11 @@ define('UNIQUEID', 'account');
// Examples: define("SERVER", "default:");
// define("SERVER", "http://localhost:236/kopano");
// define("SERVER", "https://localhost:237/kopano");
// define("SERVER", "file:///var/run/kopano/server.sock)";
// define("SERVER", "file:///var/run/kopano/server.sock");
// If you are using ZCP >= 7.2.0, set it to the zarafa location, e.g.
// define("SERVER", "http://localhost:236/zarafa");
// define("SERVER", "https://localhost:237/zarafa");
// define("SERVER", "file:///var/run/zarafad/server.sock)";
// define("SERVER", "file:///var/run/zarafad/server.sock");
// For ZCP versions prior to 7.2.0 the socket location is different (http(s) sockets are the same):
// define("SERVER", "file:///var/run/zarafa");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment