Commit 5e3f5036 authored by Dries's avatar Dries

- Patch #453080 by Gabor Hojtsy: moved the footer message to a block.

parent f96d0a9e
......@@ -111,7 +111,8 @@ Drupal 7.0, xxxx-xx-xx (development version)
- Page organization
* Made the help text area a full featured region with blocks.
* Site mission is replaced with the highlighted content block region and
separate RSS feed description settings.
separate RSS feed description settings.
* The footer message setting was removed in favor of custom blocks.
- Upgraded the core JavaScript library to jQuery version 1.3.2.
- Upgraded the jQuery Forms library to 2.21.
......
......@@ -1816,7 +1816,6 @@ function template_preprocess_page(&$variables) {
$variables['front_page'] = url();
$variables['breadcrumb'] = theme('breadcrumb', drupal_get_breadcrumb());
$variables['feed_icons'] = drupal_get_feeds();
$variables['footer_message'] = filter_xss_admin(variable_get('site_footer', FALSE));
$variables['head'] = drupal_get_html_head();
$variables['language'] = $GLOBALS['language'];
$variables['language']->dir = $GLOBALS['language']->direction ? 'rtl' : 'ltr';
......
......@@ -245,7 +245,6 @@ function template_preprocess_maintenance_page(&$variables) {
$variables['front_page'] = url();
$variables['breadcrumb'] = '';
$variables['feed_icons'] = '';
$variables['footer_message'] = filter_xss_admin(variable_get('site_footer', FALSE));
$variables['head'] = drupal_get_html_head();
$variables['help'] = '';
$variables['language'] = $GLOBALS['language'];
......
......@@ -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 -->
......
......@@ -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 -->
......
......@@ -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'),
......
......@@ -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();
......
......@@ -75,7 +75,7 @@
<div class="clearfix">
<?php print $content ?>
</div>
<div id="footer"><?php print $footer_message . $footer ?></div>
<div id="footer"><?php print $footer ?></div>
</div></div></div></div> <!-- /.left-corner, /.right-corner, /#squeeze, /#center -->
<?php if ($right): ?>
......
......@@ -56,7 +56,7 @@
<?php print $content ?>
</div>
<?php print $feed_icons ?>
<div id="footer"><?php print $footer_message . $footer ?></div>
<div id="footer"><?php print $footer ?></div>
</div></div></div></div> <!-- /.left-corner, /.right-corner, /#squeeze, /#center -->
<?php if ($right): ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment