Skip to content
Snippets Groups Projects
Commit 3729441a authored by Angie Byron's avatar Angie Byron
Browse files

#706860 by hunmonk: Fixed update_fix_d7_block_deltas() helper function broken...

#706860 by hunmonk: Fixed update_fix_d7_block_deltas() helper function broken due to block table rename.
parent c197ce35
No related branches found
No related tags found
No related merge requests found
...@@ -180,7 +180,8 @@ function update_fix_d7_block_deltas(&$sandbox, $renamed_deltas) { ...@@ -180,7 +180,8 @@ function update_fix_d7_block_deltas(&$sandbox, $renamed_deltas) {
// Loop through each block and make changes to the block tables. // Loop through each block and make changes to the block tables.
// Only run this the first time through the batch update. // Only run this the first time through the batch update.
if (!isset($sandbox['progress'])) { if (!isset($sandbox['progress'])) {
$block_tables = array('blocks', 'blocks_roles'); // Determine whether to use the old or new block table names.
$block_tables = db_table_exists('blocks') ? array('blocks', 'blocks_roles') : array('block', 'block_role');
foreach ($block_tables as $table) { foreach ($block_tables as $table) {
foreach ($renamed_deltas as $module => $deltas) { foreach ($renamed_deltas as $module => $deltas) {
foreach ($deltas as $old_delta => $new_delta) { foreach ($deltas as $old_delta => $new_delta) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment