[Fusionforge-commits] r13106 - in branches/Branch_5_1/src/plugins/scmgit: common etc

Roland Mas lolando at fusionforge.org
Wed Apr 13 14:56:45 CEST 2011


Author: lolando
Date: 2011-04-13 14:56:44 +0200 (Wed, 13 Apr 2011)
New Revision: 13106

Modified:
   branches/Branch_5_1/src/plugins/scmgit/common/GitPlugin.class.php
   branches/Branch_5_1/src/plugins/scmgit/etc/scmgit.ini
Log:
Fixed displaying of read/write instructions for scmgit [#267]

Modified: branches/Branch_5_1/src/plugins/scmgit/common/GitPlugin.class.php
===================================================================
--- branches/Branch_5_1/src/plugins/scmgit/common/GitPlugin.class.php	2011-04-13 09:55:46 UTC (rev 13105)
+++ branches/Branch_5_1/src/plugins/scmgit/common/GitPlugin.class.php	2011-04-13 12:56:44 UTC (rev 13106)
@@ -127,13 +127,24 @@
 				$b .= '<p><tt>git clone '.$protocol.'://'.$d.'@' . $project->getSCMBox() . '/'. forge_get_config('scm_root', 'scmgit') .'/'. $project->getUnixName() .'/'. $project->getUnixName() .'.git</tt></p>' ;
 			}
 		} else {
-			$b = '<h2>';
-			$b .= _('Developer GIT Access via SSH');
-			$b .= '</h2>';
-			$b .= '<p>';
-			$b .= _('Only project developers can access the GIT tree via this method. SSH must be installed on your client machine. Substitute <i>developername</i> with the proper value. Enter your site password when prompted.');
-			$b .= '</p>';
-			$b .= '<p><tt>git clone git+ssh://<i>'._('developername').'</i>@' . $project->getSCMBox() . '/'. forge_get_config('scm_root', 'scmgit') .'/'. $project->getUnixName() .'/'. $project->getUnixName() .'.git</tt></p>' ;
+			if (forge_get_config('use_ssh', 'scmgit')) {
+				$b = '<h2>';
+				$b .= _('Developer GIT Access via SSH');
+				$b .= '</h2>';
+				$b .= '<p>';
+				$b .= _('Only project developers can access the GIT tree via this method. SSH must be installed on your client machine. Substitute <i>developername</i> with the proper value. Enter your site password when prompted.');
+				$b .= '</p>';
+				$b .= '<p><tt>git clone git+ssh://<i>'._('developername').'</i>@' . $project->getSCMBox() . '/'. forge_get_config('scm_root', 'scmgit') .'/'. $project->getUnixName() .'/'. $project->getUnixName() .'.git</tt></p>' ;
+			} elseif (forge_get_config('use_dav', 'scmgit')) {
+				$protocol = forge_get_config('use_ssl', 'scmgit')? 'https' : 'http';
+				$b = '<h2>';
+				$b .= _('Developer GIT Access via HTTP');
+				$b .= '</h2>';
+				$b .= '<p>';
+				$b .= _('Only project developers can access the GIT tree via this method. Enter your site password when prompted.');
+				$b .= '</p>';
+				$b .= '<p><tt>git clone '.$protocol.'://<i>'._('developername').'</i>@' . $project->getSCMBox() . '/'. forge_get_config('scm_root', 'scmgit') .'/'. $project->getUnixName() .'/'. $project->getUnixName() .'.git</tt></p>' ;
+			}
 		}
 
 		if (session_loggedin()) {

Modified: branches/Branch_5_1/src/plugins/scmgit/etc/scmgit.ini
===================================================================
--- branches/Branch_5_1/src/plugins/scmgit/etc/scmgit.ini	2011-04-13 09:55:46 UTC (rev 13105)
+++ branches/Branch_5_1/src/plugins/scmgit/etc/scmgit.ini	2011-04-13 12:56:44 UTC (rev 13106)
@@ -2,3 +2,6 @@
 
 default_server = "$core/web_host"
 repos_path = "$core/chroot/scmrepos/git"
+use_ssh = true
+use_dav = false
+use_ssl = "$core/use_ssl"




More information about the Fusionforge-commits mailing list