You are here

function panels_vid_settings_form_submit in Panels 5.2

Same name and namespace in other branches
  1. 6.2 arguments/vid.inc \panels_vid_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_vid_settings_form_submit'
panels_vid_panels_arguments in arguments/vid.inc
@file arguments/vid.inc

File

arguments/vid.inc, line 72
arguments/vid.inc

Code

function panels_vid_settings_form_submit(&$values) {
  $vocs = taxonomy_get_vocabularies();
  if (!empty($values['displays'])) {
    foreach ($values['displays'] as $vid => $value) {
      if (empty($vocs[$vid])) {
        unset($values['displays'][$vid]);
      }
    }
  }
}