From: JKingsnorth Date: Mon, 9 Mar 2015 10:19:00 +0000 (+0000) Subject: CRM-10551: Don't delete blocks that aren't mentioned in the update X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0cc3a40beed934080456ef555b29cfe3b97dc8a7;p=civicrm-core.git CRM-10551: Don't delete blocks that aren't mentioned in the update --- diff --git a/CRM/Core/BAO/Block.php b/CRM/Core/BAO/Block.php index fcf9f3324b..7913238590 100644 --- a/CRM/Core/BAO/Block.php +++ b/CRM/Core/BAO/Block.php @@ -378,16 +378,6 @@ class CRM_Core_BAO_Block { $blocks[] = $baoString::add($blockFields); } - // we need to delete blocks that were deleted during update - if ($updateBlankLocInfo && !empty($blockIds)) { - foreach ($blockIds as $deleteBlock) { - if (empty($deleteBlock['id'])) { - continue; - } - self::blockDelete($blockName, array('id' => $deleteBlock['id'])); - } - } - return $blocks; }