Commit 68617f02 authored by fago's avatar fago

#384916 patch by avf: fixed random behaviour when submitting content_access...

#384916 patch by avf: fixed random behaviour when submitting content_access forms which occured since drupal 6.10 - this time really.
parent 0f872247
......@@ -68,7 +68,7 @@ function content_access_page_submit($form, &$form_state) {
$node = $form_state['node'];
foreach (_content_access_get_operations() as $op) {
// Set the settings so that further calls will return this settings.
$settings[$op] = array_filter($form_state['values'][$op]);
$settings[$op] = array_keys(array_filter($form_state['values'][$op]));
}
// Save per-node settings.
content_access_save_per_node_settings($node, $settings);
......@@ -156,7 +156,7 @@ function content_access_admin_settings_submit($form, &$form_state) {
foreach (content_access_available_settings() as $setting) {
unset($settings[$setting][$form_state['type']]);
if (isset($form_state['values'][$setting])) {
$settings[$setting][$form_state['type']] = is_array($form_state['values'][$setting]) ? array_filter($form_state['values'][$setting]) : $form_state['values'][$setting];
$settings[$setting][$form_state['type']] = is_array($form_state['values'][$setting]) ? array_keys(array_filter($form_state['values'][$setting])) : $form_state['values'][$setting];
}
}
content_access_set_settings($settings);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment