diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2011-08-16 01:22:08 -0500 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2011-08-16 01:22:08 -0500 |
commit | 17898e7b0ba169b76f13a51ba39555a0c22205ad (patch) | |
tree | cc9a5919c7cc741a38b64911eda3aec5f5f94463 /includes | |
parent | 17e3bac069fbd66358f1f04dbb83fa842e56c3e7 (diff) | |
download | brdo-17898e7b0ba169b76f13a51ba39555a0c22205ad.tar.gz brdo-17898e7b0ba169b76f13a51ba39555a0c22205ad.tar.bz2 |
Issue #1231856 by lyricnz: Fixed menu_update_7001() breaks when updating from 7.4 or upgrading from D6.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/update.inc | 12 |
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) |