Skip to content

Commit

Permalink
Simplify.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Jun 17, 2016
1 parent 2d4faa0 commit c26517f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions framework/ActiveSync/lib/Horde/ActiveSync/Collections.php
Original file line number Diff line number Diff line change
Expand Up @@ -813,16 +813,15 @@ public function initEmptySync()
*/
public function initPartialSync()
{
// Need this for all PARTIAL sync requests.
$this->_tempSyncCache = clone $this->_cache;

// PARTIAL is allowed without a <collection> tag if the waitinterval,
// heartbeat, or windowsize changed. So, short circuit the logic for
// checking for changed collections in this case.
if (empty($this->_collections)) {
$this->_logger->info('No collections in collection handler, loading full collection set from cache.');
$this->loadCollectionsFromCache();

// Need this for all PARTIAL sync requests.
$this->_tempSyncCache = clone $this->_cache;

foreach ($this->_collections as $value) {
// Remove keys from confirmed synckeys array and count them
if (isset($value['synckey'])) {
Expand All @@ -845,7 +844,6 @@ public function initPartialSync()
return true;
}

$this->_tempSyncCache = clone $this->_cache;
$c = $this->_tempSyncCache->getCollections();
foreach ($this->_collections as $key => $value) {
// Collections from cache might not all have synckeys.
Expand Down

0 comments on commit c26517f

Please sign in to comment.