function node_page_disable_enable in Node Page Disable 6
Same name and namespace in other branches
- 7 node_page_disable.install \node_page_disable_enable()
Implements hook_enable().
File
- ./
node_page_disable.install, line 24 - Handles installation steps for node_page_disable
Code
function node_page_disable_enable() {
// Set up the default value based on frontpage
$frontpage = variable_get('site_frontpage', 'node');
if ($frontpage == 'node') {
variable_set('node_page_disable_path_node_keep', TRUE);
}
else {
variable_set('node_page_disable_path_node_keep', FALSE);
drupal_set_message(t('The path <a href="@url">/node</a> is no longer active.', array(
'@url' => url('node'),
)));
}
variable_set('menu_rebuild_needed', TRUE);
// Message about module settings
drupal_set_message(t('You may adjust settings for Node Page Disable by visiting <a href="@url">@url</a>.', array(
'@url' => url('admin/config/system/site-information'),
)));
}