function panels_nid_settings_form_submit in Panels 6.2
Same name and namespace in other branches
- 5.2 arguments/nid.inc \panels_nid_settings_form_submit()
There appears to be a bit of a bug with the way we're handling forms; it causes 'checkboxes' to get invalid values added to them when empty. This takes care of that.
1 string reference to 'panels_nid_settings_form_submit'
- panels_nid_panels_arguments in arguments/
nid.inc - @file arguments/nid.inc
File
- arguments/
nid.inc, line 98 - arguments/nid.inc
Code
function panels_nid_settings_form_submit(&$values) {
$types = node_get_types();
if (!empty($values['types'])) {
foreach ($values['types'] as $type => $value) {
if (empty($types[$type])) {
unset($values['types'][$type]);
}
}
}
if (!empty($values['displays'])) {
foreach ($values['displays'] as $type => $value) {
if (empty($types[$type])) {
unset($values['displays'][$type]);
}
}
}
}