function spaces_og_form_group_submit in Spaces 7
Same name and namespace in other branches
- 6.3 spaces_og/spaces_og.module \spaces_og_form_group_submit()
- 7.3 spaces_og/spaces_og.module \spaces_og_form_group_submit()
Group form submit handler.
1 string reference to 'spaces_og_form_group_submit'
- _spaces_og_form_alter_group in spaces_og/
spaces_og.pages.inc - Group node form_alter(). @TODO: repair default values on node previews.
File
- spaces_og/
spaces_og.module, line 386
Code
function spaces_og_form_group_submit($form, &$form_state) {
if (!empty($form_state['nid']) && ($space = spaces_load('og', $form_state['nid']))) {
$preset_val = $space->controllers->variable
->get('site_frontpage', 'preset');
$space_val = $space->controllers->variable
->get('site_frontpage', 'space');
if (!empty($preset_val) || !empty($space_val)) {
purl_goto($space->controllers->variable
->get('site_frontpage'), array(
'purl' => array(
'provider' => 'spaces_og',
'id' => $space->id,
),
));
}
else {
purl_goto("node/{$space->id}", array(
'purl' => array(
'provider' => 'spaces_og',
'id' => $space->id,
),
));
}
}
}