Index: og.module =================================================================== --- og.module (revision 171) +++ og.module (working copy) @@ -99,6 +99,29 @@ $items[] = array('path' => 'node/'. arg(1). '/email', 'title' => t('E-mail'), 'callback' => 'drupal_get_form', 'callback arguments' => array('og_email_form', arg(1)), 'access' => og_is_node_admin($node), 'type' => MENU_LOCAL_TASK, 'weight' => 7); } } + + // dcl_import supoprt for importing contact lists to invite form + if (module_exists('dcl_importer') && (arg(1) == "invite")) { + $items[] = array( + 'path' => 'og/invite/'. arg(2) ."/bulk", + 'title' => t('Import contacts'), + 'callback' => 'drupal_get_form', + 'callback arguments' => 'dcl_importer_form', + 'access' => user_access('DCL importer'), + 'type' => MENU_LOCAL_TASK, + 'weight' => 10, + ); + + $items[] = array('path' => "og/invite/".arg(2), 'callback' => 'og_menu_check', 'title' => t('Send Invitations or Import Contacts'), + 'callback arguments' => array('og_invite_page',arg(2)), 'type' => MENU_LOCAL_TASK, 'access' => 1); + $items[] = array( + 'path' => "og/invite/".arg(2)."/general", + 'title' => t('Email'), + 'access' => 1, + 'type' => MENU_DEFAULT_LOCAL_TASK); + if (arg(3) == "bulk" ) $GLOBALS['_menu']['items'][$GLOBALS['_menu']['path index']['og/invite']]['title'] = ''; + } + } return $items; } @@ -617,6 +640,11 @@ $form['op'] = array('#type' => 'submit', '#value' => t('Send invitation')); $form['gid'] = array ('#type' => 'value', '#value' => $gid); $form['valid_emails'] = array('#type' => 'value', '#value' => array()); + + if (isset($_SESSION['invite_failed_emails'])) { + $form['mails']['#value'] = implode("\n", (array)unserialize($_SESSION['invite_failed_emails'])); + unset($_SESSION['invite_failed_emails']); + } return $form; }