isError() && $template_project->isTemplate()) { // Valid template selected, nothing to do } elseif (forge_get_config('allow_project_without_template')) { // Empty projects allowed $built_from_template = 0 ; } elseif (count($template_projects) == 0) { // No empty projects allowed, but no template available $built_from_template = 0 ; } else { // No empty projects allowed, picking the first available template $built_from_template = $template_projects[0]->getID() ; } $scm_host = ''; if (forge_get_config('use_scm')) { $plugin = false ; if (forge_get_config('use_scm') && $scm && $scm != 'noscm') { $plugin = plugin_get_object($scm); if ($plugin) { $scm_host = $plugin->getDefaultServer(); } } } if ( !$purpose && forge_get_config ('project_auto_approval') ) { $purpose = 'No purpose given, autoapprove was on'; } $send_mail = ! forge_get_config ('project_auto_approval') ; $group = new Group(); $u = session_get_user(); $res = $group->create( $u, $full_name, $unix_name, $description, $purpose, 'shell1', $scm_host, 0, $send_mail, $built_from_template ); if ($res && forge_get_config('use_scm') && $plugin) { $group->setUseSCM (true) ; $res = $group->setPluginUse ($scm, true); } else { $group->setUseSCM (false) ; } if (!$res) { form_release_key(getStringFromRequest("form_key")); $error_msg .= $group->getErrorMessage(); } else { $HTML->header(array('title'=>_('Registration complete'))); if ( ! forge_get_config ('project_auto_approval') ) { printf(_('
Your project has been submitted to the %1$s administrators. Within 72 hours, you will receive notification of their decision and further instructions.
Thank you for choosing %1$s
'), forge_get_config ('forge_name')); } else if ($group->isError()) { printf(_('Your project has been automatically approved. You should receive an email containing further information shortly.
Thank you for choosing %1$s
'), forge_get_config ('forge_name')); } } $HTML->footer(array()); exit(); } } else if (getStringFromRequest('i_disagree')) { session_redirect("/"); } site_header(array('title'=>_('Register Project'))); ?>