function og_panels_table_submit in Organic groups 5
Same name and namespace in other branches
- 5.8 og_panels.module \og_panels_table_submit()
- 5.3 og_panels.module \og_panels_table_submit()
- 5.7 og_panels.module \og_panels_table_submit()
- 6 modules/og_panels/og_panels.module \og_panels_table_submit()
File
- ./
og_panels.module, line 241
Code
function og_panels_table_submit($form_id, $form_values) {
db_query("UPDATE {og_panels} SET default_page = 0 WHERE nid = %d", $form_values['group_node']->nid);
foreach ($form_values['displays'] as $did => $settings) {
$default = $did == $form_values['default_page'] ? TRUE : FALSE;
$sql = "UPDATE {og_panels} SET weight = %d, default_page = %d WHERE did = %d";
db_query($sql, $settings['weight'], $default, $did);
}
drupal_set_message(t('Updated panels configuration.'));
}