function spaces_announce_group_save in Spaces 5.2
Same name and namespace in other branches
- 5 spaces_announce/spaces_announce.module \spaces_announce_group_save()
After build handler for announcement node forms.
1 string reference to 'spaces_announce_group_save'
- spaces_announce_form_alter in spaces_announce/
spaces_announce.module - Implementation of hook_form_alter.
File
- spaces_announce/
spaces_announce.module, line 200
Code
function spaces_announce_group_save($form, $form_values) {
if (count($form['#post'])) {
$space = spaces_get_space();
$gid = $space->sid;
$gids[$gid] = $gid;
if (count($form['#post']['announce'])) {
$announce_gids = $form['#post']['announce'];
}
elseif (isset($form['#post']['announce_hidden'])) {
$announce_gids = unserialize($form['#post']['announce_hidden']);
}
if (is_array($announce_gids)) {
foreach ($announce_gids as $value) {
$gids[$value] = $value;
}
form_set_value($form['og_nodeapi']['visible']['og_groups'], $gids);
}
}
return $form;
}