You are here

function vppr_form_admin_settings_vppr_submit in Vocabulary Permissions Per Role 6

Store VPPR perms to the DB.

File

./vppr.admin.inc, line 64
Vocabulary Permissions Per Role - administration UI

Code

function vppr_form_admin_settings_vppr_submit($form, &$form_state) {
  $perms = array();
  foreach ($form_state['values']['vppr_perms'] as $vid => $values) {
    $values = array_filter($values);
    if (!empty($values)) {
      $perms[$vid] = $values;
    }
  }
  variable_set('vppr_perms', $perms);
}