Skip to content

Commit

Permalink
Only save the properties, not deviceInfo when $all is true.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed May 19, 2014
1 parent e0c99d4 commit 26c8ff9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions framework/ActiveSync/lib/Horde/ActiveSync/Device.php
Expand Up @@ -325,10 +325,18 @@ public function getLastSyncTimestamp()

/**
* Save the dirty device info data.
*
* @param boolean $all If true, save all properties (deviceInfo and
* deviceProperties). Otherwise, just save dirty
* deviceProperties. @since 2.16.0
* @todo For 3.0, make it clearer taht deviceInfo is per-user and
* deviceProperties is per-device.
*/
public function save()
public function save($all = true)
{
$this->_state->setDeviceInfo($this, $this->_dirty);
if ($all) {
$this->_state->setDeviceInfo($this, $this->_dirty);
}
if (!empty($this->_dirty['properties'])) {
$this->_state->setDeviceProperties($this->properties, $this->id);
}
Expand Down

0 comments on commit 26c8ff9

Please sign in to comment.