function panels_node_add_settings_form_submit in Panels 5.2
Same name and namespace in other branches
- 6.2 arguments/node_add.inc \panels_node_add_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_node_add_settings_form_submit'
- panels_node_add_panels_arguments in arguments/
node_add.inc - @file arguments/nid.inc
File
- arguments/
node_add.inc, line 83 - arguments/nid.inc
Code
function panels_node_add_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]);
}
}
}
}