function features_cleanup_form_disable in Features 6
Same name and namespace in other branches
- 7 features.admin.inc \features_cleanup_form_disable()
Submit handler for disable action on features_cleanup_form().
1 string reference to 'features_cleanup_form_disable'
- features_cleanup_form in ./
features.admin.inc - Form for disabling orphaned dependencies.
File
- ./
features.admin.inc, line 680
Code
function features_cleanup_form_disable(&$form, &$form_state) {
if (!empty($form_state['values']['orphans'])) {
$disable = array_keys(array_filter($form_state['values']['orphans']));
$ignored = array_diff(array_keys($form_state['values']['orphans']), $disable);
// Disable any orphans that have been selected.
module_disable($disable);
drupal_flush_all_caches();
// Add enabled modules to ignored orphans list.
$ignored_orphans = variable_get('features_ignored_orphans', array());
foreach ($ignored as $module) {
$ignored_orphans[$module] = $module;
}
variable_set('features_ignored_orphans', $ignored_orphans);
}
$form_state['redirect'] = 'admin/build/features/cleanup';
}