Move code for enabling the farmOS theme to its own install task. See #272
This commit is contained in:
parent
867f3c063c
commit
5c30ea34e2
23
farm.install
23
farm.install
|
@ -63,14 +63,7 @@ function farm_install() {
|
|||
// Only admins can create new accounts.
|
||||
variable_set('user_register', USER_REGISTER_ADMINISTRATORS_ONLY);
|
||||
|
||||
// Enable farm theme and set as default.
|
||||
theme_enable(array('farm_theme'));
|
||||
variable_set('theme_default', 'farm_theme');
|
||||
|
||||
// Disable the default Bartik theme
|
||||
theme_disable(array('bartik'));
|
||||
|
||||
// Set the front page to the farm dashboard (provided by the farm_admin).
|
||||
// Set the front page to the farm dashboard.
|
||||
variable_set('site_frontpage', 'farm');
|
||||
|
||||
// Use the farm menu for primary links (provided by farm_admin).
|
||||
|
@ -90,6 +83,7 @@ function farm_install_tasks(&$install_state) {
|
|||
'display_name' => st('Install optional modules'),
|
||||
'type' => 'batch',
|
||||
),
|
||||
'farm_install_theme' => array(),
|
||||
);
|
||||
return $tasks;
|
||||
}
|
||||
|
@ -229,6 +223,19 @@ function _farm_install_enable_module($module, $module_name, &$context) {
|
|||
$context['message'] = st('Installed %module module.', array('%module' => $module_name));
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback for farmOS theme install task.
|
||||
*/
|
||||
function farm_install_theme() {
|
||||
|
||||
// Enable farm theme and set as default.
|
||||
theme_enable(array('farm_theme'));
|
||||
variable_set('theme_default', 'farm_theme');
|
||||
|
||||
// Disable the default Bartik theme
|
||||
theme_disable(array('bartik'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_update_dependencies().
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue