Fix footer and utility links blocks in bootstrap theme

The block placement handled by module installation hooks. This
patch updates the block placement themes to the default one,
so missing utility links and footer blocks will appear after
a clean install.

Change-Id: Ieede94ac2ef67ff35b681e5b817bec0a38fa6dc8
This commit is contained in:
Marton Kiss 2014-10-28 17:56:10 +01:00
parent 6f49e0c5b6
commit fb630f1d2c
2 changed files with 8 additions and 5 deletions

View File

@ -9,11 +9,12 @@
*/
function commons_utility_links_install() {
cache_clear_all('*', 'cache_block', TRUE);
$theme = variable_get('theme_default', 'openstack_bootstrap');
// Place site blocks in the menu_bar and header regions.
$utility_block = array(
'module' => 'commons_utility_links',
'delta' => 'commons_utility_links',
'theme' => 'openstack',
'theme' => $theme,
'visibility' => 0,
'region' => 'header',
'status' => 1,
@ -28,7 +29,7 @@ function commons_utility_links_install() {
->fields(array('cache' => DRUPAL_NO_CACHE))
->condition('delta', 'commons_utility_links')
->condition('module', 'commons_utility_links')
->condition('theme', 'openstack')
->condition('theme', $theme)
->execute();
}
@ -36,6 +37,7 @@ function commons_utility_links_install() {
* Remove utility_links block, and enable commons_utility_links, that never caches.
*/
function commons_utility_links_update_7301() {
$theme = variable_get('theme_default', 'openstack_bootstrap');
db_delete('block')
->condition('module', 'commons_utility_links')
->condition('delta', 'utility_links')
@ -50,7 +52,7 @@ function commons_utility_links_update_7301() {
))
->condition('delta', 'commons_utility_links')
->condition('module', 'commons_utility_links')
->condition('theme', 'openstack')
->condition('theme', $theme)
->execute();
cache_clear_all('*', 'cache_block', TRUE);
}

View File

@ -9,11 +9,12 @@
*/
function groups_footer_install() {
cache_clear_all('*', 'cache_block', TRUE);
$theme = variable_get('theme_default', 'openstack_bootstrap');
// Place site blocks in the footer region.
$footer_block = array(
'module' => 'groups_footer',
'delta' => 'groups_footer',
'theme' => 'openstack',
'theme' => $theme,
'visibility' => 0,
'region' => 'footer',
'status' => 0,
@ -33,7 +34,7 @@ function groups_footer_install() {
))
->condition('delta', 'groups_footer')
->condition('module', 'groups_footer')
->condition('theme', 'openstack')
->condition('theme', $theme)
->execute();
}