function forum_form_main

cis7 forum.admin.inc forum_form_main($type, $edit = array())
cle7 forum.admin.inc forum_form_main($type, $edit = array())
elmsmedia7 forum.admin.inc forum_form_main($type, $edit = array())
icor7 forum.admin.inc forum_form_main($type, $edit = array())
meedjum_blog7 forum.admin.inc forum_form_main($type, $edit = array())
mooc7 forum.admin.inc forum_form_main($type, $edit = array())

Page callback: Returns a form for creating a new forum or container.

Parameters

$type: What is being added. Possible values are 'forum' and 'container'.

$edit: (optional) Associative array containing a forum term to be edited. Defaults to an empty array.

Return value

A form for creating a new forum or container.

See also

forum_menu()

1 string reference to 'forum_form_main'
forum_menu in modules/forum/forum.module
Implements hook_menu().

File

modules/forum/forum.admin.inc, line 22
Administrative page callbacks for the Forum module.

Code

function forum_form_main($type, $edit = array()) {
  $edit = (array) $edit;
  if ((isset($_POST['op']) && $_POST['op'] == t('Delete')) || !empty($_POST['confirm'])) {
    return drupal_get_form('forum_confirm_delete', $edit['tid']);
  }
  switch ($type) {
    case 'forum':
      return drupal_get_form('forum_form_forum', $edit);
      break;
    case 'container':
      return drupal_get_form('forum_form_container', $edit);
      break;
  }
}