[Fusionforge-commits] r17780 - in trunk/src: common/include plugins/contribtracker/common plugins/contribtracker/www utils/fixscripts www/admin www/export www/include www/register

Marc-Etienne VARGENAU vargenau at fusionforge.org
Thu Aug 22 18:41:02 CEST 2013


Author: vargenau
Date: 2013-08-22 18:41:02 +0200 (Thu, 22 Aug 2013)
New Revision: 17780

Modified:
   trunk/src/common/include/RBACEngine.class.php
   trunk/src/common/include/User.class.php
   trunk/src/plugins/contribtracker/common/ContribTrackerPlugin.class.php
   trunk/src/plugins/contribtracker/www/index.php
   trunk/src/plugins/contribtracker/www/project_admin.php
   trunk/src/utils/fixscripts/populate_template_project.php
   trunk/src/www/admin/approve-pending.php
   trunk/src/www/export/forum.php
   trunk/src/www/include/role_utils.php
   trunk/src/www/register/index.php
Log:
Whitespace

Modified: trunk/src/common/include/RBACEngine.class.php
===================================================================
--- trunk/src/common/include/RBACEngine.class.php	2013-08-22 16:34:51 UTC (rev 17779)
+++ trunk/src/common/include/RBACEngine.class.php	2013-08-22 16:41:02 UTC (rev 17780)
@@ -207,7 +207,7 @@
 		switch ($class_id) {
 		case 'PFO_RoleExplicit':
 			$group_id = db_result ($res, 0, 'home_group_id') ;
-			$group = group_get_object ($group_id) ;
+			$group = group_get_object($group_id) ;
 			$this->_cached_roles[$role_id] = new Role ($group, $role_id) ;
 			return $this->_cached_roles[$role_id] ;
 		case 'PFO_RoleAnonymous':

Modified: trunk/src/common/include/User.class.php
===================================================================
--- trunk/src/common/include/User.class.php	2013-08-22 16:34:51 UTC (rev 17779)
+++ trunk/src/common/include/User.class.php	2013-08-22 16:41:02 UTC (rev 17780)
@@ -1661,7 +1661,7 @@
 	/* Codendi Glue */
 	function isMember($g, $type = 0){
 		if (is_int ($g) || is_string($g)) {
-			$group = group_get_object ($g) ;
+			$group = group_get_object($g) ;
 			$group_id = $g ;
 		} else {
 			$group = $g ;

Modified: trunk/src/plugins/contribtracker/common/ContribTrackerPlugin.class.php
===================================================================
--- trunk/src/plugins/contribtracker/common/ContribTrackerPlugin.class.php	2013-08-22 16:34:51 UTC (rev 17779)
+++ trunk/src/plugins/contribtracker/common/ContribTrackerPlugin.class.php	2013-08-22 16:41:02 UTC (rev 17780)
@@ -98,7 +98,7 @@
 
 		elseif ($hookname == "project_before_frs") {
 			$group_id = $params['group_id'];
-			$group = group_get_object ($group_id);
+			$group = group_get_object($group_id);
 
 			if ($group->usesPlugin($this->name)) {
 				global $HTML ;
@@ -729,7 +729,7 @@
 	function getDate () { return $this->data_array['date'] ; }
 	function getDescription () { return $this->data_array['description'] ; }
 	function getGroup () {
-		return group_get_object ($this->data_array['group_id']) ;
+		return group_get_object($this->data_array['group_id']) ;
 	}
 
 	function getParticipations () {

Modified: trunk/src/plugins/contribtracker/www/index.php
===================================================================
--- trunk/src/plugins/contribtracker/www/index.php	2013-08-22 16:34:51 UTC (rev 17779)
+++ trunk/src/plugins/contribtracker/www/index.php	2013-08-22 16:41:02 UTC (rev 17780)
@@ -26,102 +26,102 @@
 
 require_once '../../env.inc.php';
 require_once $gfcommon.'include/pre.php';
-$plugin = plugin_get_object ('contribtracker') ;
+$plugin = plugin_get_object ('contribtracker');
 
 function display_contribution ($c, $show_groups = false) {
-	global $plugin ;
-	print '<h2>'.$c->getName().'</h2>' ;
+	global $plugin;
+	print '<h2>'.$c->getName().'</h2>';
 	if ($show_groups) {
-		print '<strong>'._('Project')._(':').'</strong> ' ;
+		print '<strong>'._('Project')._(':').'</strong> ';
 		print util_make_link_g ($c->getGroup()->getUnixName(),
 					$c->getGroup()->getId(),
-					htmlspecialchars ($c->getGroup()->getPublicName())) ;
-		print '<br />' ;
+					htmlspecialchars ($c->getGroup()->getPublicName()));
+		print '<br />';
 	}
 
-	print '<strong>'._('Date')._(':').'</strong> ' ;
-	print strftime (_('%Y-%m-%d'), $c->getDate ()) ;
-	print '<br />' ;
+	print '<strong>'._('Date')._(':').'</strong> ';
+	print strftime (_('%Y-%m-%d'), $c->getDate ());
+	print '<br />';
 
-	print '<strong>'._('Description')._(':').'</strong> ' ;
-	print htmlspecialchars ($c->getDescription ()) ;
-	print '<br />' ;
+	print '<strong>'._('Description')._(':').'</strong> ';
+	print htmlspecialchars ($c->getDescription ());
+	print '<br />';
 
-	$parts = $c->getParticipations () ;
+	$parts = $c->getParticipations ();
 	print '<strong>'.ngettext('Participant:',
 				  'Participants:',
-				  count ($parts)).'</strong> ' ;
-	print '<br />' ;
-	print '<ul>' ;
+				  count ($parts)).'</strong> ';
+	print '<br />';
+	print '<ul>';
 	foreach ($parts as $p) {
-		print '<li>' ;
+		print '<li>';
 		printf (_('%s: %s (%s)'),
 			htmlspecialchars ($p->getRole()->getName()),
 			util_make_link ('/plugins/'.$plugin->name.'/?actor_id='.$p->getActor()->getId (),
 					htmlspecialchars ($p->getActor()->getName())),
-			htmlspecialchars ($p->getActor()->getLegalStructure()->getName())) ;
+			htmlspecialchars ($p->getActor()->getLegalStructure()->getName()));
 		if ($p->getActor()->getLogo() != '') {
 			print ' ';
 			print util_make_link ('/plugins/'.$plugin->name.'/?actor_id='.$p->getActor()->getId (),
-					      '<img type="image/png" src="'.util_make_url ('/plugins/'.$plugin->name.'/actor_logo.php?actor_id='.$p->getActor()->getId ()).'" />') ;
+					      '<img type="image/png" src="'.util_make_url ('/plugins/'.$plugin->name.'/actor_logo.php?actor_id='.$p->getActor()->getId ()).'" />');
 		}
-		print '</li>' ;
+		print '</li>';
 	}
-	print '</ul>' ;
+	print '</ul>';
 }
 
-$group_id = getIntFromRequest ('group_id') ;
-$actor_id = getIntFromRequest ('actor_id') ;
+$group_id = getIntFromRequest('group_id');
+$actor_id = getIntFromRequest('actor_id');
 if ($group_id) {
-	$group = group_get_object ($group_id) ;
+	$group = group_get_object($group_id);
 	if(!$group || !is_object ($group)) {
-		exit_no_group () ;
+		exit_no_group ();
 	}
 	session_require_perm ('project_read', $group_id);
 
-	$contrib_id = getIntFromRequest ('contrib_id') ;
+	$contrib_id = getIntFromRequest ('contrib_id');
 	if ($contrib_id) {    // List only one particular contribution
-		$contrib = new ContribTrackerContribution ($contrib_id) ;
+		$contrib = new ContribTrackerContribution ($contrib_id);
 		if (!$contrib || !is_object ($contrib)
 		    || $contrib->getGroup()->getId() != $group_id) {
-			exit_permission_denied ('','home') ;
+			exit_permission_denied ('','home');
 		}
 
-		$params = array () ;
-		$params['toptab'] = 'contribtracker' ;
-		$params['group'] = $group_id ;
-		$params['title'] = _('Contribution details') ;
-		$params['pagename'] = 'contribtracker' ;
+		$params = array ();
+		$params['toptab'] = 'contribtracker';
+		$params['group'] = $group_id;
+		$params['title'] = _('Contribution details');
+		$params['pagename'] = 'contribtracker';
 		$params['sectionvals'] = array($group->getPublicName());
 
-		site_project_header ($params) ;
+		site_project_header ($params);
 
-		display_contribution ($contrib) ;
+		display_contribution ($contrib);
 	} else {	// List all contributions relevant to a group
-		$params = array () ;
-		$params['toptab'] = 'contribtracker' ;
-		$params['group'] = $group_id ;
+		$params = array ();
+		$params['toptab'] = 'contribtracker';
+		$params['group'] = $group_id;
 		$params['title'] = sprintf (_('Contributions for project %s'),
 					    htmlspecialchars ($group->getPublicName()));
-		$params['pagename'] = 'contribtracker' ;
+		$params['pagename'] = 'contribtracker';
 		$params['sectionvals'] = array($group->getPublicName());
 
 		site_project_header($params);
 
-		$contribs = $plugin->getContributionsByGroup ($group) ;
+		$contribs = $plugin->getContributionsByGroup ($group);
 
 		if (count ($contribs) == 0) {
-			print '<h1>'._('No contributions').'</h1>' ;
-			print _('No contributions have been recorded for this project yet.') ;
+			print '<h1>'._('No contributions').'</h1>';
+			print _('No contributions have been recorded for this project yet.');
 		} else {
 			foreach ($contribs as $c) {
-				display_contribution ($c) ;
-				print '<hr />' ;
+				display_contribution ($c);
+				print '<hr />';
 			}
 		}
 	}
 } elseif ($actor_id) {
-	$actor = new ContribTrackerActor ($actor_id) ;
+	$actor = new ContribTrackerActor ($actor_id);
 	if (!is_object ($actor) || $actor->isError()) {
 		exit_error (_('Invalid actor'),'contribtracker');
 	}
@@ -129,68 +129,68 @@
 	$HTML->header(array('title'=>_('Actor details'),'pagename'=>'contribtracker'));
 
 	print '<h1>'.sprintf(_('Actor details for %s'),
-			     htmlspecialchars($actor->getName())).'</h1>' ;
-	print '<ul>' ;
-	print '<li><strong>'._('Name')._(':').'</strong> '.htmlspecialchars($actor->getName()).'</li>' ;
-	print '<li><strong>'._('URL')._(':').'</strong> ' ;
+			     htmlspecialchars($actor->getName())).'</h1>';
+	print '<ul>';
+	print '<li><strong>'._('Name')._(':').'</strong> '.htmlspecialchars($actor->getName()).'</li>';
+	print '<li><strong>'._('URL')._(':').'</strong> ';
 	if ($actor->getUrl() != '') {
 		print '<a href="'.htmlspecialchars($actor->getUrl()).'">'.htmlspecialchars($actor->getUrl()).'</a>';
 	}
-	print '</li>' ;
-	print '<li><strong>'._('Email')._(':').'</strong> '.htmlspecialchars($actor->getEmail()).'</li>' ;
-	print '<li><strong>'._('Legal structure')._(':').'</strong> '.htmlspecialchars($actor->getLegalStructure()->getName()).'</li>' ;
-	print '<li><strong>'._('Description')._(':').'</strong> '.htmlspecialchars($actor->getDescription()).'</li>' ;
-	print '</ul>' ;
+	print '</li>';
+	print '<li><strong>'._('Email')._(':').'</strong> '.htmlspecialchars($actor->getEmail()).'</li>';
+	print '<li><strong>'._('Legal structure')._(':').'</strong> '.htmlspecialchars($actor->getLegalStructure()->getName()).'</li>';
+	print '<li><strong>'._('Description')._(':').'</strong> '.htmlspecialchars($actor->getDescription()).'</li>';
+	print '</ul>';
 	if ($actor->getLogo() != '') {
 		if ($actor->getUrl() != '') {
-			print '<a href="'.htmlspecialchars($actor->getUrl()).'"><img type="image/png" src="'.util_make_url ('/plugins/'.$plugin->name.'/actor_logo.php?actor_id='.$actor->getId ()).'" /></a>' ;
+			print '<a href="'.htmlspecialchars($actor->getUrl()).'"><img type="image/png" src="'.util_make_url ('/plugins/'.$plugin->name.'/actor_logo.php?actor_id='.$actor->getId ()).'" /></a>';
 		} else {
-			print '<img type="image/png" src="'.util_make_url ('/plugins/'.$plugin->name.'/actor_logo.php?actor_id='.$actor->getId ()).'" />' ;
+			print '<img type="image/png" src="'.util_make_url ('/plugins/'.$plugin->name.'/actor_logo.php?actor_id='.$actor->getId ()).'" />';
 		}
 	}
 
-	$participations = $actor->getParticipations () ;
+	$participations = $actor->getParticipations ();
 
 	if (count ($participations) == 0) {
 		printf (_("%s hasn't been involved in any contributions yet"),
-			htmlspecialchars($actor->getName())) ;
+			htmlspecialchars($actor->getName()));
 	} else {
 		print '<h1>'.sprintf(ngettext('Contribution by %s',
 					      'Contributions by %s',
 					      count($participations)),
-				     htmlspecialchars($actor->getName())).'</h1>' ;
+				     htmlspecialchars($actor->getName())).'</h1>';
 
 		foreach ($participations as $p) {
-			$c = $p->getContribution () ;
+			$c = $p->getContribution ();
 			print '<h2>' . util_make_link ('/plugins/'.$plugin->name.'/?group_id='.$c->getGroup()->getId().'&contrib_id='.$c->getId (),
-						       htmlspecialchars ($c->getName())) . '</h2>' ;
-			print '<strong>'._('Project')._(':').'</strong> ' ;
+						       htmlspecialchars ($c->getName())) . '</h2>';
+			print '<strong>'._('Project')._(':').'</strong> ';
 			print util_make_link_g ($c->getGroup()->getUnixName(),
 						$c->getGroup()->getId(),
-						$c->getGroup()->getPublicName()) ;
-			print '<br /><strong>'._('Role')._(':').'</strong> ' ;
-			print htmlspecialchars ($p->getRole()->getName()) ;
-			print '<hr />' ;
+						$c->getGroup()->getPublicName());
+			print '<br /><strong>'._('Role')._(':').'</strong> ';
+			print htmlspecialchars ($p->getRole()->getName());
+			print '<hr />';
 		}
 	}
 } else {			// Latest contributions, globally
 	$HTML->header(array('title'=>_('Contributions'),'pagename'=>'contribtracker'));
 
-	$contribs = $plugin->getContributions () ;
+	$contribs = $plugin->getContributions ();
 
 	if (count ($contribs) == 0) {
-		print '<h1>'._('No contributions').'</h1>' ;
-		print _('No contributions have been recorded yet.') ;
+		print '<h1>'._('No contributions').'</h1>';
+		print _('No contributions have been recorded yet.');
 	} else {
-		print '<h1>'._('Latest contributions').'</h1>' ;
+		print '<h1>'._('Latest contributions').'</h1>';
 
-		$i = 1 ;
+		$i = 1;
 		foreach ($contribs as $c) {
-			display_contribution ($c, true) ;
-			print '<hr />' ;
-			$i++ ;
+			display_contribution ($c, true);
+			print '<hr />';
+			$i++;
 			if ($i > 20) {
-				break ;
+				break;
 			}
 		}
 	}

Modified: trunk/src/plugins/contribtracker/www/project_admin.php
===================================================================
--- trunk/src/plugins/contribtracker/www/project_admin.php	2013-08-22 16:34:51 UTC (rev 17779)
+++ trunk/src/plugins/contribtracker/www/project_admin.php	2013-08-22 16:41:02 UTC (rev 17780)
@@ -9,11 +9,11 @@
 
 require_once '../../env.inc.php';
 require_once $gfcommon.'include/pre.php';
-$plugin = plugin_get_object ('contribtracker') ;
+$plugin = plugin_get_object('contribtracker') ;
 
-$group_id = getIntFromRequest ('group_id') ;
-session_require_perm ('project_admin', $group_id) ;
-$group = group_get_object ($group_id) ;
+$group_id = getIntFromRequest('group_id') ;
+session_require_perm('project_admin', $group_id) ;
+$group = group_get_object($group_id) ;
 
 $params = array () ;
 $params['toptab'] = 'contribtracker' ;

Modified: trunk/src/utils/fixscripts/populate_template_project.php
===================================================================
--- trunk/src/utils/fixscripts/populate_template_project.php	2013-08-22 16:34:51 UTC (rev 17779)
+++ trunk/src/utils/fixscripts/populate_template_project.php	2013-08-22 16:41:02 UTC (rev 17780)
@@ -30,8 +30,8 @@
 require_once 'common/include/Plugin.class.php';
 require_once 'common/include/PluginManager.class.php';
 
-setup_plugin_manager () ;
-session_set_admin () ;
+setup_plugin_manager ();
+session_set_admin ();
 
 function usage($rc=1) {
 	echo "Usage:\n";
@@ -159,41 +159,41 @@
 		}
 	}
 
-	$ra = RoleAnonymous::getInstance() ;
-	$rl = RoleLoggedIn::getInstance() ;
-	$ra->linkProject ($project) ;
-	$rl->linkProject ($project) ;
+	$ra = RoleAnonymous::getInstance();
+	$rl = RoleLoggedIn::getInstance();
+	$ra->linkProject ($project);
+	$rl->linkProject ($project);
 
-	$ra->setSetting ('project_read', $project->getID(), 1) ;
-	$rl->setSetting ('project_read', $project->getID(), 1) ;
+	$ra->setSetting ('project_read', $project->getID(), 1);
+	$rl->setSetting ('project_read', $project->getID(), 1);
 
-	$ra->setSetting ('frs', $project->getID(), 1) ;
-	$rl->setSetting ('frs', $project->getID(), 1) ;
+	$ra->setSetting ('frs', $project->getID(), 1);
+	$rl->setSetting ('frs', $project->getID(), 1);
 
-	$ra->setSetting ('docman', $project->getID(), 1) ;
-	$rl->setSetting ('docman', $project->getID(), 1) ;
+	$ra->setSetting ('docman', $project->getID(), 1);
+	$rl->setSetting ('docman', $project->getID(), 1);
 
-	$ra->setSetting ('forum', $f1->getID(), 3) ;
-	$rl->setSetting ('forum', $f1->getID(), 3) ;
+	$ra->setSetting ('forum', $f1->getID(), 3);
+	$rl->setSetting ('forum', $f1->getID(), 3);
 
-	$ra->setSetting ('forum', $f2->getID(), 3) ;
-	$rl->setSetting ('forum', $f2->getID(), 3) ;
+	$ra->setSetting ('forum', $f2->getID(), 3);
+	$rl->setSetting ('forum', $f2->getID(), 3);
 
-	$pgf = new ProjectGroupFactory ($project) ;
+	$pgf = new ProjectGroupFactory ($project);
 	foreach ($pgf->getAllProjectGroupIds() as $pgid) {
-		$pg = projectgroup_get_object ($pgid) ;
+		$pg = projectgroup_get_object($pgid);
 		if ($pg->isPublic()) {
-			$ra->setSetting ('pm', $pgid, 1) ;
-			$rl->setSetting ('pm', $pgid, 1) ;
+			$ra->setSetting ('pm', $pgid, 1);
+			$rl->setSetting ('pm', $pgid, 1);
 		}
 	}
 
-	$atf = new ArtifactTypeFactory ($project) ;
+	$atf = new ArtifactTypeFactory ($project);
 	foreach ($atf->getAllArtifactTypeIds() as $atid) {
-		$at = artifactType_get_object ($atid) ;
+		$at = artifactType_get_object ($atid);
 		if ($at->isPublic()) {
-			$ra->setSetting ('tracker', $atid, 1) ;
-			$rl->setSetting ('tracker', $atid, 1) ;
+			$ra->setSetting ('tracker', $atid, 1);
+			$rl->setSetting ('tracker', $atid, 1);
 		}
 	}
 
@@ -207,7 +207,7 @@
 			return false;
 		}
 	}
-	$project->normalizeAllRoles () ;
+	$project->normalizeAllRoles ();
 
 	db_commit();
 

Modified: trunk/src/www/admin/approve-pending.php
===================================================================
--- trunk/src/www/admin/approve-pending.php	2013-08-22 16:34:51 UTC (rev 17779)
+++ trunk/src/www/admin/approve-pending.php	2013-08-22 16:41:02 UTC (rev 17780)
@@ -206,7 +206,7 @@
 	}
 
 	$submitter = NULL ;
-	$project = group_get_object ($row_grp['group_id']) ;
+	$project = group_get_object($row_grp['group_id']) ;
 	foreach (get_group_join_requests ($project) as $gjr) {
 		$submitter = user_get_object($gjr->getUserID()) ;
 		echo '<tr><td>'
@@ -215,7 +215,7 @@
 	}
 
 	if ($row_grp['built_from_template']) {
-		$templateproject = group_get_object ($row_grp['built_from_template']) ;
+		$templateproject = group_get_object($row_grp['built_from_template']) ;
 		print "<tr><td>" . _('Based on template project') . '</td><td>'. $templateproject->getPublicName() .' ('. $templateproject->getUnixName().")</td></tr>";
 	}
 

Modified: trunk/src/www/export/forum.php
===================================================================
--- trunk/src/www/export/forum.php	2013-08-22 16:34:51 UTC (rev 17779)
+++ trunk/src/www/export/forum.php	2013-08-22 16:41:02 UTC (rev 17780)
@@ -29,7 +29,7 @@
 $group_id = getIntFromRequest('group_id');
 
 session_require_perm ('project_read', $group_id) ;
-$group = group_get_object ($group_id) ;
+$group = group_get_object($group_id);
 
 
 print '<?xml version="1.0"?>

Modified: trunk/src/www/include/role_utils.php
===================================================================
--- trunk/src/www/include/role_utils.php	2013-08-22 16:34:51 UTC (rev 17779)
+++ trunk/src/www/include/role_utils.php	2013-08-22 16:41:02 UTC (rev 17780)
@@ -27,7 +27,7 @@
  * @return string
  */
 function role_box ($group_id,$name,$selected='xzxzxz',$local_only=true) {
-	$group = group_get_object ($group_id) ;
+	$group = group_get_object($group_id);
 	$roles = $group->getRoles () ;
 
 	if ($local_only) {
@@ -60,7 +60,7 @@
 }
 
 function external_role_box ($group_id,$name) {
-	$group = group_get_object ($group_id) ;
+	$group = group_get_object($group_id);
 	$roles = array () ;
 	foreach (RBACEngine::getInstance()->getPublicRoles() as $r) {
 		$grs = $r->getLinkedProjects () ;

Modified: trunk/src/www/register/index.php
===================================================================
--- trunk/src/www/register/index.php	2013-08-22 16:34:51 UTC (rev 17779)
+++ trunk/src/www/register/index.php	2013-08-22 16:41:02 UTC (rev 17780)
@@ -73,7 +73,7 @@
 		$scm = 'noscm' ;
 	}
 
-	$template_project = group_get_object ($built_from_template) ;
+	$template_project = group_get_object($built_from_template);
 	if ($template_project
 	    && !$template_project->isError()
 	    && $template_project->isTemplate()) {




More information about the Fusionforge-commits mailing list