[Fusionforge-commits] r16201 - branches/Branch_5_2/src/www/include

Franck VILLAUME nerville at fusionforge.org
Mon Sep 3 19:53:26 CEST 2012


Author: nerville
Date: 2012-09-03 19:53:25 +0200 (Mon, 03 Sep 2012)
New Revision: 16201

Modified:
   branches/Branch_5_2/src/www/include/user_home.php
Log:
remove double fix for private project in user_home

Modified: branches/Branch_5_2/src/www/include/user_home.php
===================================================================
--- branches/Branch_5_2/src/www/include/user_home.php	2012-09-03 12:09:31 UTC (rev 16200)
+++ branches/Branch_5_2/src/www/include/user_home.php	2012-09-03 17:53:25 UTC (rev 16201)
@@ -110,58 +110,42 @@
 			continue;
 		}
 
-		$display = 0;
-		if (!$p->isPublic()) {
-			$currentUser = session_get_user();
-			if ($currentUser) {
-				$pMembers = $p->getMembers();
-				foreach ($pMembers as $pMember) {
-					if ($pMember->getID() == $currentUser->getID()) {
-						$display = 1;
-					}
-				}
+		$project_link = util_make_link_g ($p->getUnixName(),$p->getID(),$p->getPublicName());
+		$project_uri = util_make_url_g ($p->getUnixName(),$p->getID());
+		// sioc:UserGroups for all members of a project are named after /projects/A_PROJECT/members/
+		$usergroup_uri = $project_uri .'members/';
+
+		print '<div rel="sioc:member_of">'."\n"
+			.'<div about="'. $usergroup_uri .'" typeof="sioc:UserGroup">'."\n"
+			.'<div rel="sioc:usergroup_of">'."\n"
+			.'<div about="'. $project_uri .'" typeof="sioc:Space">';
+		$role_names = array () ;
+		$sioc_has_function_close = "";
+		foreach ($roles as $r) {
+			if ($r instanceof RoleExplicit
+			&& $r->getHomeProject() != NULL
+			&& $r->getHomeProject()->getID() == $p->getID()) {
+				$role_names[] = $r->getName() ;
+				print '<div property="sioc:has_function" content= "'.$r->getName().'">';
+				$sioc_has_function_close .= "</div>";
 			}
-		} else {
-			$display = 1;
 		}
-		if ($display) {
-			$project_link = util_make_link_g ($p->getUnixName(),$p->getID(),$p->getPublicName());
-			$project_uri = util_make_url_g ($p->getUnixName(),$p->getID());
-			// sioc:UserGroups for all members of a project are named after /projects/A_PROJECT/members/
-			$usergroup_uri = $project_uri .'members/';
 
-			print '<div rel="sioc:member_of">'."\n"
-				.'<div about="'. $usergroup_uri .'" typeof="sioc:UserGroup">'."\n"
-				.'<div rel="sioc:usergroup_of">'."\n"
-				.'<div about="'. $project_uri .'" typeof="sioc:Space">';
-			$role_names = array () ;
-			$sioc_has_function_close = "";
-			foreach ($roles as $r) {
-				if ($r instanceof RoleExplicit
-				&& $r->getHomeProject() != NULL
-				&& $r->getHomeProject()->getID() == $p->getID()) {
-					$role_names[] = $r->getName() ;
-					print '<div property="sioc:has_function" content= "'.$r->getName().'">';
-					$sioc_has_function_close .= "</div>";
-				}
-			}
+		print ('<br />' . $project_link .' ('.htmlspecialchars (implode (', ', $role_names)).')');
+		print "\n";
 
-			print ('<br />' . $project_link .' ('.htmlspecialchars (implode (', ', $role_names)).')');
-			print "\n";
-
-			if (forge_check_perm_for_user ($user, 'project_admin', $p->getID())) {
-				print '<span rev="doap:maintainer" resource="#me"></span>';
-			}
-			else {
-				print '<span rev="doap:developer" resource="#me"></span>';
-			}
-
-			echo $sioc_has_function_close."\n";  // sioc:has_function
-			echo "</div>\n";  // sioc:Space .../projects/A_PROJECT/
-			echo "</div>\n"; // sioc:usergroup_of
-			echo "</div>\n";  // sioc:UserGroup .../projects/A_PROJECT/members
-			echo "</div>\n"; // sioc:member_of
+		if (forge_check_perm_for_user ($user, 'project_admin', $p->getID())) {
+			print '<span rev="doap:maintainer" resource="#me"></span>';
 		}
+		else {
+			print '<span rev="doap:developer" resource="#me"></span>';
+		}
+
+		echo $sioc_has_function_close."\n";  // sioc:has_function
+		echo "</div>\n";  // sioc:Space .../projects/A_PROJECT/
+		echo "</div>\n"; // sioc:usergroup_of
+		echo "</div>\n";  // sioc:UserGroup .../projects/A_PROJECT/members
+		echo "</div>\n"; // sioc:member_of
 	}
 } // end if groups
 echo "</div>\n"; // prefixes




More information about the Fusionforge-commits mailing list