diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/system/maintenance-page.tpl.php | 1 | ||||
-rw-r--r-- | modules/system/page.tpl.php | 2 | ||||
-rw-r--r-- | modules/system/system.admin.inc | 6 | ||||
-rw-r--r-- | modules/system/system.install | 13 |
4 files changed, 13 insertions, 9 deletions
diff --git a/modules/system/maintenance-page.tpl.php b/modules/system/maintenance-page.tpl.php index baaacd9cd..41ab3f13d 100644 --- a/modules/system/maintenance-page.tpl.php +++ b/modules/system/maintenance-page.tpl.php @@ -85,7 +85,6 @@ <div id="footer-wrapper"> <div id="footer"> - <?php print $footer_message; ?> <?php if (!empty($footer)): print $footer; endif; ?> </div> <!-- /footer --> </div> <!-- /footer-wrapper --> diff --git a/modules/system/page.tpl.php b/modules/system/page.tpl.php index fae0e461c..1eda0553c 100644 --- a/modules/system/page.tpl.php +++ b/modules/system/page.tpl.php @@ -63,7 +63,6 @@ * - $highlight: The HTML for the highlighted content region. * * Footer/closing data: - * - $footer_message: The footer message as defined in the admin settings. * - $footer : The footer region. * - $closure: Final closing markup from any modules that have altered the page. * This variable should always be output last, after all other dynamic content. @@ -164,7 +163,6 @@ <div id="footer"><div class="section"> <?php print theme('links', $secondary_menu, array('id' => 'secondary-menu', 'class' => 'links clearfix')); ?> - <?php if ($footer_message): ?><div id="footer-message"><?php print $footer_message; ?></div><?php endif; ?> <?php if ($footer): ?><div id="footer-region" class="region"><?php print $footer; ?></div><?php endif; ?> </div></div> <!-- /.section, /#footer --> diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index d3a607ce3..1c994e26d 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -1188,12 +1188,6 @@ function system_site_information_settings() { '#default_value' => '', '#description' => t("Your site's motto, tag line, or catchphrase (often displayed alongside the title of the site).") ); - $form['site_footer'] = array( - '#type' => 'textarea', - '#title' => t('Footer message'), - '#default_value' => '', - '#description' => t('This text will be displayed at the bottom of each page. Useful for adding a copyright notice to your pages.') - ); $form['anonymous'] = array( '#type' => 'textfield', '#title' => t('Anonymous user'), diff --git a/modules/system/system.install b/modules/system/system.install index 67b4d2391..dad1775f5 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -3362,11 +3362,24 @@ function system_update_7021() { variable_set('feed_description', $mission); } + // 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(); + 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 + // before the other blocks). + $ret[] = update_sql("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('block', '" . $bid . "', '" . $theme . "', 1, -10, 'footer', '', -1)"); + } + drupal_set_message('The footer message was migrated to <a href="' . url('admin/build/block/configure/block/' . $bid) . '">a custom block</a> and set up to appear in the footer. The block was set to use the default text format, which might differ from the HTML based format used before. Please check the block and ensure that the output is right. If your theme does not have a footer region, you might need to <a href="' . url('admin/build/block') . '">relocate the block</a>.'); + } + // Remove the variables (even if they were saved empty on the admin interface), // to avoid keeping clutter in the variables table. variable_del('contact_form_information'); variable_del('user_registration_help'); variable_del('site_mission'); + variable_del('site_footer'); // Rebuild theme data, so the new 'help' region is identified. system_theme_data(); |