Skip to content

Commit

Permalink
Simplify.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Mar 24, 2014
1 parent c4ca518 commit 96f7037
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions framework/ActiveSync/lib/Horde/ActiveSync.php
Expand Up @@ -1018,17 +1018,16 @@ public function getPolicyKey()
/**
* Obtain the ActiveSync protocol version requested by the client headers.
*
* @return long
* @return string The EAS version requested by the client.
*/
public function getProtocolVersion()
{
if (isset(self::$_version)) {
return self::$_version;
}
self::$_version = $this->_request->getHeader('MS-ASProtocolVersion');
if (empty(self::$_version)) {
$get = $this->getGetVars();
self::$_version = empty($get['ProtVer']) ? '1.0' : $get['ProtVer'];
if (!isset(self::$_version)) {
self::$_version = $this->_request->getHeader('MS-ASProtocolVersion');
if (empty(self::$_version)) {
$get = $this->getGetVars();
self::$_version = empty($get['ProtVer']) ? '1.0' : $get['ProtVer'];
}
}
return self::$_version;
}
Expand Down

0 comments on commit 96f7037

Please sign in to comment.