Skip to content

Commit

Permalink
Only attempt to update the collections cache if there were no errors.
Browse files Browse the repository at this point in the history
Related to Bug: 13338
  • Loading branch information
mrubinsk committed Jul 10, 2014
1 parent 986c75c commit 589fabd
Showing 1 changed file with 7 additions and 3 deletions.
Expand Up @@ -189,8 +189,10 @@ protected function _handle()

$this->_encoder->endTag();
} elseif ($update) {
$collections->updateFolderInHierarchy($folder, true);
$collections->save();
if ($status == self::STATUS_SUCCESS) {
$collections->updateFolderInHierarchy($folder, true);
$collections->save();
}

$this->_encoder->startTag(self::FOLDERUPDATE);

Expand All @@ -204,7 +206,9 @@ protected function _handle()

$this->_encoder->endTag();
} elseif ($delete) {
$collections->deleteFolderFromHierarchy($server_uid);
if ($status == self::STATUS_SUCCESS) {
$collections->deleteFolderFromHierarchy($server_uid);
}
$this->_encoder->startTag(self::FOLDERDELETE);

$this->_encoder->startTag(Horde_ActiveSync::FOLDERHIERARCHY_STATUS);
Expand Down

0 comments on commit 589fabd

Please sign in to comment.