forum_form_submit
Definition
forum_form_submit($form_id, $form_values)
modules/forum/forum.module, line 526
Description
Process forum form and container form submissions.
Code
<?php
function forum_form_submit($form_id, $form_values) {
if ($form_id == 'forum_form_container') {
$container = TRUE;
$type = t('forum container');
}
else {
$container = FALSE;
$type = t('forum');
}
$status = taxonomy_save_term($form_values);
switch ($status) {
case SAVED_NEW:
if ($container) {
$containers = variable_get('forum_containers', array());
$containers[] = $form_values['tid'];
variable_set('forum_containers', $containers);
}
drupal_set_message(t('Created new @type %term.', array('%term' => $form_values['name'], '@type' => $type)));
break;
case SAVED_UPDATED:
drupal_set_message(t('The @type %term has been updated.', array('%term' => $form_values['name'], '@type' => $type)));
break;
}
return 'admin/content/forum';
}
?> 