From 34195e40dc63cba685e0970b42cfc7effbfaab6e Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Mon, 10 Apr 2017 10:18:17 +0200 Subject: [PATCH] Fix error in Provision when using SecurePIM client Change-Id: I8cdbbf39dcff337ffb1a18e68c4f3f8e7f45772c --- lib/Syncroton/Command/Provision.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/Syncroton/Command/Provision.php b/lib/Syncroton/Command/Provision.php index 3163d5f..e340de4 100644 --- a/lib/Syncroton/Command/Provision.php +++ b/lib/Syncroton/Command/Provision.php @@ -62,17 +62,17 @@ public function handle() $this->_device->remotewipe = self::REMOTEWIPE_CONFIRMED; } - // try to fetch element from Settings namespace + // try to fetch element from Settings namespace $settings = $xml->children('uri:Settings'); if (isset($settings->DeviceInformation) && isset($settings->DeviceInformation->Set)) { $this->_deviceInformation = new Syncroton_Model_DeviceInformation($settings->DeviceInformation->Set); - $this->_device->model = $this->_deviceInformation->model; - $this->_device->imei = $this->_deviceInformation->iMEI; - $this->_device->friendlyname = $this->_deviceInformation->friendlyName; - $this->_device->os = $this->_deviceInformation->oS; - $this->_device->oslanguage = $this->_deviceInformation->oSLanguage; - $this->_device->phonenumber = $this->_deviceInformation->phoneNumber; + $this->_device->model = $this->_deviceInformation->model; + $this->_device->imei = $this->_deviceInformation->iMEI; + $this->_device->friendlyname = $this->_deviceInformation->friendlyName; + $this->_device->os = $this->_deviceInformation->oS; + $this->_device->oslanguage = $this->_deviceInformation->oSLanguage; + $this->_device->phonenumber = $this->_deviceInformation->phoneNumber; } if ($this->_device->isDirty()) { @@ -95,19 +95,19 @@ public function getResponse() if ($this->_logger instanceof Zend_Log) $this->_logger->debug(__METHOD__ . '::' . __LINE__ . ' PolicyType: ' . $this->_policyType . ' PolicyKey: ' . $this->_sendPolicyKey); - if($this->_sendPolicyKey === NULL) { + if (!$this->_sendPolicyKey) { $this->_sendPolicy(); } elseif ($this->_sendPolicyKey == $this->_device->policykey) { $this->_acknowledgePolicy(); - } - } + } + } return $this->_outputDom; } /** * function the send policy to client - * + * * 4131 (Enforce password on device) 0: enabled 1: disabled * 4133 (Unlock from computer) 0: disabled 1: enabled * AEFrequencyType 0: no inactivity time 1: inactivity time is set @@ -120,7 +120,7 @@ public function getResponse() */ protected function _sendPolicy() { - if ($this->_logger instanceof Zend_Log) + if ($this->_logger instanceof Zend_Log) $this->_logger->info(__METHOD__ . '::' . __LINE__ . ' send policy to device'); $provision = $sync = $this->_outputDom->documentElement;