CRM-10551: Don't delete blocks that aren't mentioned in the update
authorJKingsnorth <john@johnkingsnorth.co.uk>
Mon, 9 Mar 2015 10:19:00 +0000 (10:19 +0000)
committerJKingsnorth <john@johnkingsnorth.co.uk>
Mon, 9 Mar 2015 10:19:00 +0000 (10:19 +0000)
CRM/Core/BAO/Block.php

index fcf9f3324b28301a0702a5fac466490f4505a4cf..7913238590aa8b5c36d129b14c5f86b0fc4f052a 100644 (file)
@@ -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;
   }