[Fusionforge-commits] r13704 - branches/Branch_5_1/src/www/register

Roland Mas lolando at fusionforge.org
Thu Jul 7 14:30:58 CEST 2011


Author: lolando
Date: 2011-07-07 14:30:58 +0200 (Thu, 07 Jul 2011)
New Revision: 13704

Modified:
   branches/Branch_5_1/src/www/register/index.php
Log:
Fixed project registration when use_scm is false, and set a non-empty default for scm_host

Modified: branches/Branch_5_1/src/www/register/index.php
===================================================================
--- branches/Branch_5_1/src/www/register/index.php	2011-07-07 11:20:30 UTC (rev 13703)
+++ branches/Branch_5_1/src/www/register/index.php	2011-07-07 12:30:58 UTC (rev 13704)
@@ -87,8 +87,8 @@
 		$built_from_template = $template_projects[0]->getID() ;
 	}
 
+	$scm_host = '';
 	if (forge_get_config('use_scm')) {
-		$scm_host = '';
 		$plugin = false ;
 		if (forge_get_config('use_scm') && $scm && $scm != 'noscm') {
 			$plugin = plugin_get_object($scm);
@@ -96,7 +96,12 @@
 				$scm_host = $plugin->getDefaultServer();
 			}
 		}
+	}
 
+	if ($scm_host == '') {
+		$scm_host = forge_get_config('web_host');
+	}
+
 		if ( !$purpose && forge_get_config ('project_auto_approval') ) {
 			$purpose = 'No purpose given, autoapprove was on';
 		}
@@ -147,7 +152,6 @@
 			$HTML->footer(array());
 			exit();
 		}
-	}
 } else if (getStringFromRequest('i_disagree')) {
 	session_redirect("/");
 } else {




More information about the Fusionforge-commits mailing list