[Fusionforge-commits] r7971 - in trunk/gforge/plugins: scmbzr/common scmcvs/common scmsvn/common

Roland Mas lolando at libremir.placard.fr.eu.org
Thu Aug 27 15:37:29 CEST 2009


Author: lolando
Date: 2009-08-27 15:37:28 +0200 (Thu, 27 Aug 2009)
New Revision: 7971

Modified:
   trunk/gforge/plugins/scmbzr/common/BzrPlugin.class.php
   trunk/gforge/plugins/scmcvs/common/CVSPlugin.class.php
   trunk/gforge/plugins/scmsvn/common/SVNPlugin.class.php
Log:
Use SCMPlugin::browserDisplayable()

Modified: trunk/gforge/plugins/scmbzr/common/BzrPlugin.class.php
===================================================================
--- trunk/gforge/plugins/scmbzr/common/BzrPlugin.class.php	2009-08-27 13:37:20 UTC (rev 7970)
+++ trunk/gforge/plugins/scmbzr/common/BzrPlugin.class.php	2009-08-27 13:37:28 UTC (rev 7971)
@@ -87,10 +87,6 @@
 		}
 
 		if ($project->usesPlugin ($this->name)) {
-			// Bazaar browser links must be displayed if
-			// project enables anonymous Bazaar
-			$displayBzrBrowser = $project->enableAnonSCM();
-
 			// Table for summary info
 			print ('<table width="100%">
 				 <tr valign="top">
@@ -117,7 +113,7 @@
 			print '<p><tt>bzr checkout bzr+ssh://<i>'._('developername').'</i>@' . $project->getSCMBox() . '/'. $this->svn_root .'/'. $project->getUnixName().'/'._('branchname').'</tt></p>' ;
 		
 			// Bazaar Snapshot
-			if ($displaySvnBrowser) {
+			if ($this->browserDisplayable ($project) {
 				$filename=$project->getUnixName().'-scm-latest.tar.gz';
 				if (file_exists($sys_scm_snapshots_path.'/'.$filename)) {
 					print '<p>[' ;
@@ -134,7 +130,7 @@
 			echo $HTML->boxTop(_('Repository History'));
 			echo _('Not implemented yet');
 			/*				echo $this->getDetailedStats(array('group_id'=>$group_id)).'<p>';
-			 if ($displaySvnBrowser) {
+			 if ($this->browserDisplayable ($project) {
 			 echo _('<b>Browse the Bazaar Tree</b><p>Browsing the Bazaar tree gives you a great view into the current status of this project\'s code. You may also view the complete histories of any file in the repository.</p>');
 			 echo '<p>[' ;
 			 echo util_make_link ("/scm/viewvc.php/?root=".$project->getUnixName(),

Modified: trunk/gforge/plugins/scmcvs/common/CVSPlugin.class.php
===================================================================
--- trunk/gforge/plugins/scmcvs/common/CVSPlugin.class.php	2009-08-27 13:37:20 UTC (rev 7970)
+++ trunk/gforge/plugins/scmcvs/common/CVSPlugin.class.php	2009-08-27 13:37:28 UTC (rev 7971)
@@ -104,17 +104,6 @@
 			$cvsrootend=$project->getSCMBox().':/cvsroot/'.$project->getUnixName();
 			$cvsrootend = $project->getSCMBox().':'.$this->cvs_root.'/'.$project->getUnixName();
 
-			// CVS browser links must be displayed if
-			// project enables anon CVS or if logged-in
-			// user is a member of the group
-			$displayCvsBrowser = $project->enableAnonSCM();
-			if(session_loggedin()) {
-				$perm =& $project->getPermission(session_get_user());
-				if ($perm && is_object($perm) && !$perm->isError() && $perm->isMember()) {
-					$displayCvsBrowser = true;
-				}
-			}
-
 			// Table for summary info
 			print '<table width="100%"><tr valign="top"><td width="65%">' ;
 
@@ -149,7 +138,7 @@
 			}
 			
 			// CVS Snapshot
-			if ($displayCvsBrowser) {
+			if ($this->browserDisplayable ($project)) {
 				print '<p>[' ;
 				print util_make_link ("/snapshots.php?group_id=$group_id",
 						      _('Download The Nightly CVS Tree Snapshot')
@@ -161,7 +150,7 @@
 			// CVS Browsing 
 			echo $HTML->boxTop(_('Repository History'));
 			echo $this->getDetailedStats(array('group_id'=>$group_id)).'<p>';
-			if ($displayCvsBrowser){
+			if ($this->browserDisplayable ($project)) {
 				echo _('<b>Browse the CVS Tree</b><p>Browsing the CVS tree gives you a great view into the current status of this project\'s code. You may also view the complete histories of any file in the repository.</p>');
 				echo '<p>[' ;
 				echo util_make_link ("/scm/viewvc.php/?root=".$project->getUnixName(),

Modified: trunk/gforge/plugins/scmsvn/common/SVNPlugin.class.php
===================================================================
--- trunk/gforge/plugins/scmsvn/common/SVNPlugin.class.php	2009-08-27 13:37:20 UTC (rev 7970)
+++ trunk/gforge/plugins/scmsvn/common/SVNPlugin.class.php	2009-08-27 13:37:28 UTC (rev 7971)
@@ -92,17 +92,6 @@
 
 		if ($project->usesPlugin ($this->name)) {
 
-			// SVN browser links must be displayed if
-			// project enables anon SVN or if logged-in
-			// user is a member of the group
-			$displaySvnBrowser = $project->enableAnonSCM();
-			if(session_loggedin()) {
-				$perm =& $project->getPermission(session_get_user());
-				if ($perm && is_object($perm) && !$perm->isError() && $perm->isMember()) {
-					$displaySvnBrowser = true;
-				}
-			}
-
 			// Table for summary info
 			print '<table width="100%"><tr valign="top"><td width="65%">' ;
 			print _('<p>Documentation for Subversion (sometimes referred to as "SVN") is available <a href="http://svnbook.red-bean.com/">here</a>.</p>');
@@ -148,7 +137,7 @@
 			}
 
 			// SVN Snapshot
-			if ($displaySvnBrowser) {
+			if ($this->browserDisplayable ($project) {
 				$filename=$project->getUnixName().'-scm-latest.tar.gz';
 				if (file_exists($sys_scm_snapshots_path.'/'.$filename)) {
 					print '<p>[' ;
@@ -163,7 +152,7 @@
 			// SVN Browsing
 			echo $HTML->boxTop(_('Repository History'));
 			echo $this->getDetailedStats(array('group_id'=>$group_id)).'<p>';
-			if ($displaySvnBrowser) {
+			if ($this->browserDisplayable ($project) {
 				echo _('<b>Browse the Subversion Tree</b><p>Browsing the SVN tree gives you a great view into the current status of this project\'s code. You may also view the complete histories of any file in the repository.</p>');
 				echo '<p>[' ;
 				echo util_make_link ("/scm/viewvc.php/?root=".$project->getUnixName(),




More information about the Fusionforge-commits mailing list