function spaces_og_form_alter in Spaces 6.2
Same name and namespace in other branches
- 5.2 spaces_og.module \spaces_og_form_alter()
- 6.3 spaces_og/spaces_og.module \spaces_og_form_alter()
- 6 spaces_og/spaces_og.module \spaces_og_form_alter()
- 7.3 spaces_og/spaces_og.module \spaces_og_form_alter()
- 7 spaces_og/spaces_og.module \spaces_og_form_alter()
File
- spaces_og/
spaces_og.module, line 728
Code
function spaces_og_form_alter(&$form, $form_state, $form_id) {
switch ($form_id) {
case 'node_delete_confirm':
$node = node_load($form['nid']['#value']);
if (og_is_group_type($node->type)) {
$form['#submit'][] = '_spaces_og_node_delete_confirm_submit';
}
break;
default:
if ($form['#id'] == 'node-form' && arg(0) . '/' . arg(1) != 'admin/content') {
// GROUP NODES
if (og_is_group_type($form['#node']->type)) {
_spaces_og_form_alter_group($form, $form_state);
}
elseif (!og_is_omitted_type($form['#node']->type)) {
_spaces_og_form_alter_node($form, $form_state);
}
}
break;
}
}