summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/update.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/includes/update.inc b/includes/update.inc
index 1eb7a1d9c..1fbd8074a 100644
--- a/includes/update.inc
+++ b/includes/update.inc
@@ -355,6 +355,12 @@ function update_fix_d7_block_deltas(&$sandbox, $renamed_deltas, $moved_deltas) {
))
->fetchField();
if ($block_exists) {
+ // Delete any existing blocks with the new module+delta.
+ db_delete($table)
+ ->condition('module', $module)
+ ->condition('delta', $new_delta)
+ ->execute();
+ // Rename the old block to the new module+delta.
db_update($table)
->fields(array('delta' => $new_delta))
->condition('module', $module)
@@ -372,6 +378,12 @@ function update_fix_d7_block_deltas(&$sandbox, $renamed_deltas, $moved_deltas) {
))
->fetchField();
if ($block_exists) {
+ // Delete any existing blocks with the new module+delta.
+ db_delete($table)
+ ->condition('module', $new_module)
+ ->condition('delta', $delta)
+ ->execute();
+ // Rename the old block to the new module+delta.
db_update($table)
->fields(array('module' => $new_module))
->condition('module', $old_module)