Commit 835c30a2 authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-1367 Check if php-mapi classes are loaded.

Released under the Affero GNU General Public License (AGPL) version 3.
parent e5d7f7ca
...@@ -55,6 +55,12 @@ class Kopano extends SyncWorker { ...@@ -55,6 +55,12 @@ class Kopano extends SyncWorker {
*/ */
public function __construct() { public function __construct() {
parent::__construct(); parent::__construct();
// check if the php-mapi classes can be loaded
if (!defined('MAPI_E_FAILONEPROVIDER') || !defined('PR_CONTAINER_CLASS') || !function_exists('getPropIdsFromStrings')) {
$this->Terminate("Please verify the php-mapi configuration, as the php-mapi includes can not be found in the php include path. Aborting.");
}
// send Z-Push version and user agent to ZCP >7.2.0 // send Z-Push version and user agent to ZCP >7.2.0
if ($this->checkMapiExtVersion('7.2.0')) { if ($this->checkMapiExtVersion('7.2.0')) {
$this->session = mapi_logon_zarafa(USERNAME, PASSWORD, SERVER, CERTIFICATE, CERTIFICATE_PASSWORD, 0, self::VERSION, self::NAME. " ". self::VERSION); $this->session = mapi_logon_zarafa(USERNAME, PASSWORD, SERVER, CERTIFICATE, CERTIFICATE_PASSWORD, 0, self::VERSION, self::NAME. " ". self::VERSION);
......
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