gforge-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gforge-commits] gforge/www/register projectinfo.php,1.14,1.15


From: kikov
Subject: [Gforge-commits] gforge/www/register projectinfo.php,1.14,1.15
Date: Fri, 20 Aug 2004 06:54:34 -0500

Update of /cvsroot/gforge/gforge/www/register
In directory db.perdue.net:/tmp/cvs-serv22406

Modified Files:
        projectinfo.php 
Log Message:
Fixed a bug that occurs when:
1) $sys_use_scm On
2) No SCM plugin found
that prevents new projects to be registered.


Index: projectinfo.php
===================================================================
RCS file: /cvsroot/gforge/gforge/www/register/projectinfo.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- projectinfo.php     2 Aug 2004 19:11:05 -0000       1.14
+++ projectinfo.php     20 Aug 2004 11:54:31 -0000      1.15
@@ -147,23 +147,25 @@
 <?php
        $SCMFactory=new SCMFactory();
        if ($sys_use_scm) {
-               echo $Language->getText('register','choose_scm');
-       }
-       $scm_plugins=$SCMFactory->getSCMs();
-       if(count($scm_plugins)==1) {
-               echo $Language->getText('register','one_scm',$scm_plugins[0]);
-               echo '<input type=\'hidden\' name=\'scm\' value=\''. 
$scm_plugins[0].'\'/>';
-       } else {
-               $checked=true;
-               foreach($scm_plugins as $scm) {
-                       $myPlugin= plugin_get_object($scm);
-                       echo '<p><input type=\'radio\' name=\'scm\' ';
-                       if ($checked) {
-                               echo 'CHECKED ';
+               $scm_plugins=$SCMFactory->getSCMs();
+               if(count($scm_plugins)!=0) {    
+                       echo $Language->getText('register','choose_scm');
+                       if(count($scm_plugins)==1) {
+                               echo 
$Language->getText('register','one_scm',$scm_plugins[0]);
+                               echo '<input type=\'hidden\' name=\'scm\' 
value=\''. $scm_plugins[0].'\'/>';
+                       } else {
+                               $checked=true;
+                               foreach($scm_plugins as $scm) {
+                                       $myPlugin= plugin_get_object($scm);
+                                       echo '<p><input type=\'radio\' 
name=\'scm\' ';
+                                       if ($checked) {
+                                               echo 'CHECKED ';
+                                       }
+                                       echo 'value='.$myPlugin->name;
+                                       echo '>'.$myPlugin->text.'</input></p>';
+                                       $checked=false;
+                               }
                        }
-                       echo 'value='.$myPlugin->name;
-                       echo '>'.$myPlugin->text.'</input></p>';
-                       $checked=false;
                }
        }
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]