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:
parent
6f49e0c5b6
commit
fb630f1d2c
@ -9,11 +9,12 @@
|
|||||||
*/
|
*/
|
||||||
function commons_utility_links_install() {
|
function commons_utility_links_install() {
|
||||||
cache_clear_all('*', 'cache_block', TRUE);
|
cache_clear_all('*', 'cache_block', TRUE);
|
||||||
|
$theme = variable_get('theme_default', 'openstack_bootstrap');
|
||||||
// Place site blocks in the menu_bar and header regions.
|
// Place site blocks in the menu_bar and header regions.
|
||||||
$utility_block = array(
|
$utility_block = array(
|
||||||
'module' => 'commons_utility_links',
|
'module' => 'commons_utility_links',
|
||||||
'delta' => 'commons_utility_links',
|
'delta' => 'commons_utility_links',
|
||||||
'theme' => 'openstack',
|
'theme' => $theme,
|
||||||
'visibility' => 0,
|
'visibility' => 0,
|
||||||
'region' => 'header',
|
'region' => 'header',
|
||||||
'status' => 1,
|
'status' => 1,
|
||||||
@ -28,7 +29,7 @@ function commons_utility_links_install() {
|
|||||||
->fields(array('cache' => DRUPAL_NO_CACHE))
|
->fields(array('cache' => DRUPAL_NO_CACHE))
|
||||||
->condition('delta', 'commons_utility_links')
|
->condition('delta', 'commons_utility_links')
|
||||||
->condition('module', 'commons_utility_links')
|
->condition('module', 'commons_utility_links')
|
||||||
->condition('theme', 'openstack')
|
->condition('theme', $theme)
|
||||||
->execute();
|
->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,6 +37,7 @@ function commons_utility_links_install() {
|
|||||||
* Remove utility_links block, and enable commons_utility_links, that never caches.
|
* Remove utility_links block, and enable commons_utility_links, that never caches.
|
||||||
*/
|
*/
|
||||||
function commons_utility_links_update_7301() {
|
function commons_utility_links_update_7301() {
|
||||||
|
$theme = variable_get('theme_default', 'openstack_bootstrap');
|
||||||
db_delete('block')
|
db_delete('block')
|
||||||
->condition('module', 'commons_utility_links')
|
->condition('module', 'commons_utility_links')
|
||||||
->condition('delta', 'utility_links')
|
->condition('delta', 'utility_links')
|
||||||
@ -50,7 +52,7 @@ function commons_utility_links_update_7301() {
|
|||||||
))
|
))
|
||||||
->condition('delta', 'commons_utility_links')
|
->condition('delta', 'commons_utility_links')
|
||||||
->condition('module', 'commons_utility_links')
|
->condition('module', 'commons_utility_links')
|
||||||
->condition('theme', 'openstack')
|
->condition('theme', $theme)
|
||||||
->execute();
|
->execute();
|
||||||
cache_clear_all('*', 'cache_block', TRUE);
|
cache_clear_all('*', 'cache_block', TRUE);
|
||||||
}
|
}
|
||||||
|
@ -9,11 +9,12 @@
|
|||||||
*/
|
*/
|
||||||
function groups_footer_install() {
|
function groups_footer_install() {
|
||||||
cache_clear_all('*', 'cache_block', TRUE);
|
cache_clear_all('*', 'cache_block', TRUE);
|
||||||
|
$theme = variable_get('theme_default', 'openstack_bootstrap');
|
||||||
// Place site blocks in the footer region.
|
// Place site blocks in the footer region.
|
||||||
$footer_block = array(
|
$footer_block = array(
|
||||||
'module' => 'groups_footer',
|
'module' => 'groups_footer',
|
||||||
'delta' => 'groups_footer',
|
'delta' => 'groups_footer',
|
||||||
'theme' => 'openstack',
|
'theme' => $theme,
|
||||||
'visibility' => 0,
|
'visibility' => 0,
|
||||||
'region' => 'footer',
|
'region' => 'footer',
|
||||||
'status' => 0,
|
'status' => 0,
|
||||||
@ -33,7 +34,7 @@ function groups_footer_install() {
|
|||||||
))
|
))
|
||||||
->condition('delta', 'groups_footer')
|
->condition('delta', 'groups_footer')
|
||||||
->condition('module', 'groups_footer')
|
->condition('module', 'groups_footer')
|
||||||
->condition('theme', 'openstack')
|
->condition('theme', $theme)
|
||||||
->execute();
|
->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user