You are here

function homebox_configure_form_submit in Homebox 6

Same name and namespace in other branches
  1. 6.3 homebox.admin.inc \homebox_configure_form_submit()
  2. 6.2 homebox.admin.inc \homebox_configure_form_submit()
  3. 7.3 homebox.admin.inc \homebox_configure_form_submit()
  4. 7.2 homebox.admin.inc \homebox_configure_form_submit()

Forms for administration settings

_state

Parameters

$form:

1 string reference to 'homebox_configure_form_submit'
homebox_configure_form in ./homebox.admin.inc
Forms for administration settings

File

./homebox.admin.inc, line 520
Home box admin file, takes care admin interface for homebox

Code

function homebox_configure_form_submit($form, &$form_state) {

  // profile id
  $pid = $form_state['values']['pid'];
  $column_count = (int) $form_state['values']['columns'];
  variable_set('homebox_column_count_' . $pid, $column_count);

  // we need to update default placement in {homebox_default}
  db_query("UPDATE {homebox_default} SET region = %d WHERE pid = %d AND region > %d", $column_count, $pid, $column_count);
  db_query("UPDATE {homebox_users} SET region = %d WHERE pid = %d AND region > %d", $column_count, $pid, $column_count);
  variable_set('homebox_users_use_colors_' . $pid, (bool) $form_state['values']['colors_enabled']);
}