diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-28 19:44:05 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-28 19:44:05 +0000 |
commit | f4c6b2ba5e4330674f30674547bb399c62085662 (patch) | |
tree | b2cc891a38dcedd67157bf795ec6d9f8cd69ede6 /modules/system | |
parent | 3dea934d2b7c37e9c83f58b0da7942d40c7086f7 (diff) | |
download | brdo-f4c6b2ba5e4330674f30674547bb399c62085662.tar.gz brdo-f4c6b2ba5e4330674f30674547bb399c62085662.tar.bz2 |
#561970 by Davy Van Den Bremt: Rename 'box' to 'custom block'. Here's to core's database schema making sense.
Diffstat (limited to 'modules/system')
-rw-r--r-- | modules/system/system.install | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/modules/system/system.install b/modules/system/system.install index f774df37e..3972f33c8 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -2040,7 +2040,7 @@ function system_update_7021() { // Migrate contact form information. if ($contact_help = variable_get('contact_form_information', '')) { - $bid = db_insert('box')->fields(array('body' => $contact_help, 'info' => 'Contact page help', 'format' => FILTER_FORMAT_DEFAULT))->execute(); + $bid = db_insert('block_custom')->fields(array('body' => $contact_help, 'info' => 'Contact page help', 'format' => FILTER_FORMAT_DEFAULT))->execute(); foreach ($themes_with_blocks as $theme) { // Add contact help block for themes, which had blocks. $ret[] = update_sql("INSERT INTO {block} (module, delta, theme, status, weight, region, visibility, pages, cache) VALUES ('block', '" . $bid . "', '" . $theme . "', 1, 5, 'help', 1, 'contact', -1)"); @@ -2050,7 +2050,7 @@ function system_update_7021() { // Migrate user help setting. if ($user_help = variable_get('user_registration_help', '')) { - $bid = db_insert('box')->fields(array('body' => $user_help, 'info' => 'User registration guidelines', 'format' => FILTER_FORMAT_DEFAULT))->execute(); + $bid = db_insert('block_custom')->fields(array('body' => $user_help, 'info' => 'User registration guidelines', 'format' => FILTER_FORMAT_DEFAULT))->execute(); foreach ($themes_with_blocks as $theme) { // Add user registration help block for themes, which had blocks. $ret[] = update_sql("INSERT INTO {block} (module, delta, theme, status, weight, region, visibility, pages, cache) VALUES ('block', '" . $bid . "', '" . $theme . "', 1, 5, 'help', 1, 'user/register', -1)"); @@ -2060,7 +2060,7 @@ function system_update_7021() { // Migrate site mission setting. if ($mission = variable_get('site_mission')) { - $bid = db_insert('box')->fields(array('body' => $mission, 'info' => 'Site mission', 'format' => FILTER_FORMAT_DEFAULT))->execute(); + $bid = db_insert('block_custom')->fields(array('body' => $mission, 'info' => 'Site mission', 'format' => FILTER_FORMAT_DEFAULT))->execute(); foreach ($themes_with_blocks as $theme) { // Add mission block for themes, which had blocks. $ret[] = update_sql("INSERT INTO {block} (module, delta, theme, status, weight, region, visibility, pages, cache) VALUES ('block', '" . $bid . "', '" . $theme . "', 1, 0, 'highlight', 1, '<front>', -1)"); @@ -2072,7 +2072,7 @@ function system_update_7021() { // Migrate site footer message to a custom block. if ($footer_message = variable_get('site_footer', '')) { - $bid = db_insert('box')->fields(array('body' => $footer_message, 'info' => 'Footer message', 'format' => FILTER_FORMAT_DEFAULT))->execute(); + $bid = db_insert('block_custom')->fields(array('body' => $footer_message, 'info' => 'Footer message', 'format' => FILTER_FORMAT_DEFAULT))->execute(); foreach ($themes_with_blocks as $theme) { // Add site footer block for themes, which had blocks. // Set low weight, so the block comes early (it used to be @@ -2450,6 +2450,15 @@ function system_update_7036() { } /** + * Rename {box} table to {block_custom}. + */ +function system_update_7037() { + $ret = array(); + db_rename_table($ret, 'box', 'block_custom'); + return $ret; +} + +/** * @} End of "defgroup updates-6.x-to-7.x" * The next series of updates should start at 8000. */ |