Commit 8707e968 authored by sebastian's avatar sebastian

ZP-589 #comment pass z-push version and user agent from header to ZCP on login when on >= 7.2.0

git-svn-id: https://z-push.org/svn/z-push/trunk@1942 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 234dafd3
......@@ -164,7 +164,15 @@ class BackendZarafa implements IBackend, ISearchProvider {
try {
// check if notifications are available in php-mapi
if(function_exists('mapi_feature') && mapi_feature('LOGONFLAGS')) {
$this->session = @mapi_logon_zarafa($user, $pass, MAPI_SERVER, null, null, 0);
// send Z-Push version and user agent to ZCP - ZP-589
if (Utils::CheckMapiExtVersion('7.2.0')) {
$zpush_version = 'Z-Push_' . @constant('ZPUSH_VERSION');
$user_agent = $_SERVER['HTTP_USER_AGENT'];
$this->session = @mapi_logon_zarafa($user, $pass, MAPI_SERVER, null, null, 0, $zpush_version, $user_agent);
}
else {
$this->session = @mapi_logon_zarafa($user, $pass, MAPI_SERVER, null, null, 0);
}
$this->notifications = true;
}
// old fashioned session
......
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