[Fusionforge-commits] FusionForge branch master updated. f9607f20bfa3aeddbec5aef9c458b34fef10b7de

Franck Villaume nerville at fusionforge.org
Fri Sep 19 17:51:02 CEST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  f9607f20bfa3aeddbec5aef9c458b34fef10b7de (commit)
      from  fdb2cc1ddcde775276d75a8eeb4096d3f794fcf8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f9607f20bfa3aeddbec5aef9c458b34fef10b7de
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Fri Sep 19 17:49:12 2014 +0200

    plugin mantisbt: cleanup

diff --git a/src/plugins/mantisbt/view/viewIssues.php b/src/plugins/mantisbt/view/viewIssues.php
index 6d0f366..7cdcc52 100644
--- a/src/plugins/mantisbt/view/viewIssues.php
+++ b/src/plugins/mantisbt/view/viewIssues.php
@@ -49,17 +49,21 @@ try {
 	switch ($type) {
 		case 'user': {
 			global $mantisbt_userid;
+			global $userMantisBTConf;
 			$idsBugAll = array();
-			foreach ($mantisbtConf['url'] as $mantisbtConfUrl) {
-				$accountDataArray = array('id' => $mantisbt_userid);
-				$clientSOAP = new SoapClient($mantisbtConfUrl.'/api/soap/mantisconnect.php?wsdl', array('trace' => true, 'exceptions' => true));
-				$idsBugAll = $clientSOAP->__soapCall('mc_project_get_issues_for_user', array('username' => $username, 'password' => $password, 'project_id' => 0, 'filter_type' => 'assigned', 'target_user' => $accountDataArray));
+			$listStatus = array();
+			foreach ($userMantisBTConf as $userMantisBTConfEntry) {
+				$accountDataArray = array('id' => $userMantisBTConfEntry['mantisbt_userid']);
+				$clientSOAP = new SoapClient($userMantisBTConfEntry['url'].'/api/soap/mantisconnect.php?wsdl', array('trace' => true, 'exceptions' => true));
+				$idsBugAll[] = $clientSOAP->__soapCall('mc_project_get_issues_for_user', array('username' => $userMantisBTConfEntry['user'], 'password' => $userMantisBTConfEntry['password'], 'project_id' => 0, 'filter_type' => 'assigned', 'target_user' => $accountDataArray));
+				$listStatus[] = $clientSOAP->__soapCall('mc_enum_status', array('username' => $userMantisBTConfEntry['user'], 'password' => $userMantisBTConfEntry['password']));
 			}
 			break;
 		}
 		case 'group': {
 			$clientSOAP = new SoapClient($mantisbtConf['url'].'/api/soap/mantisconnect.php?wsdl', array('trace' => true, 'exceptions' => true));
 			$idsBugAll = $clientSOAP->__soapCall('mc_project_get_issue_headers', array('username' => $username, 'password' => $password, 'project_id' => $mantisbtConf['id_mantisbt'],  'page_number' => -1, 'per_page' => -1));
+			$listStatus = $clientSOAP->__soapCall('mc_enum_status', array('username' => $username, 'password' => $password));
 			break;
 		}
 	}
@@ -83,7 +87,6 @@ if (!isset($clientSOAP) && !isset($errorPage)) {
 	// recuperation des bugs
 	$listBug = array();
 
-	$listStatus = $clientSOAP->__soapCall('mc_enum_status', array('username' => $username, 'password' => $password));
 	$pageActuelle = getIntFromRequest('page');
 	if (empty($pageActuelle)) {
 		$pageActuelle = 1;
@@ -125,376 +128,71 @@ if (!isset($clientSOAP) && !isset($errorPage)) {
 	if (!count($listBug)) {
 		echo $HTML->warning_msg(_('No tickets to display.'));
 	} else {
-		$nbligne=0;
+		use_javascript('/js/sortable.js');
+		echo $HTML->getJavascripts();
 
-// 		$picto_haut = util_make_url('themes/gforge/images/picto_fleche_haut_marron.png');
-// 		$picto_bas = util_make_url('themes/gforge/images/picto_fleche_bas_marron.png');
-		$nbligne++;
-		//include ($gfcommon.'docman/views/help.php');
 		include ($gfplugins.$mantisbt->name.'/view/jumpToIssue.php');
-		echo '<table>';
-		echo	'<tr>';
-		// Priority
-		echo		'<th width="2%">';
-// 		echo			'<form name="filterprority" method="post" action="?type='.$type.'&group_id='.$group_id.'&pluginname='.$mantisbt->name.'">';
-// 		if ($bugfilter['sort'] == "priority" && $bugfilter['dir'] == "ASC") {
-// 			echo			'<input type=hidden name="dir" value="DESC"/>';
-// 		} elseif ($bugfilter['sort'] == "priority" && $bugfilter['dir'] == "DESC") {
-// 			echo			'<input type="hidden" name="dir" value="ASC"/>';
-// 		}
-// 		if ( isset($bugfilter['show_status'])) {
-// 			foreach ($bugfilter['show_status'] as $key => $childStatus) {
-// 				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
-// 			}
-// 		}
-// 		if ( isset($bugfilter['project_id'])) {
-// 			foreach ($bugfilter['project_id'] as $key => $childId) {
-// 				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
-// 			}
-// 		}
-// 		echo				'<input type=hidden name="sort" value="priority" />';
-// 		echo				'<a href="javascript:document.filterprority.submit();">P';
-// 		if ($bugfilter['sort'] == "priority" && $bugfilter['dir'] == "ASC" ) {
-// 			echo				'<img src="'.$picto_haut.'">';
-// 		} elseif ($bugfilter['sort'] == "priority" && $bugfilter['dir'] == "DESC" ) {
-// 			echo				'<img src="'.$picto_bas.'">';
-// 		}
-// 		echo 				'</a>';
-// 		echo			'</form>';
-		echo 'P';
-		echo 		'</th>';
-		// ID
-		echo		'<th width="3%">';
-// 		echo			'<form name="filterid" method="post" action="?type='.$type.'&group_id='.$group_id.'&pluginname='.$mantisbt->name.'">';
-// 		if ($bugfilter['sort'] == "id" && $bugfilter['dir'] == "ASC") {
-// 			echo			'<input type=hidden name="dir" value="DESC"/>';
-// 		} elseif ($bugfilter['sort'] == "id" && $bugfilter['dir'] == "DESC") {
-// 			echo			'<input type="hidden" name="dir" value="ASC"/>';
-// 		}
-// 		if ( isset($bugfilter['show_status'])) {
-// 			foreach ($bugfilter['show_status'] as $key => $childStatus) {
-// 				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
-// 			}
-// 		}
-// 		if ( isset($bugfilter['project_id'])) {
-// 			foreach ($bugfilter['project_id'] as $key => $childId) {
-// 				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
-// 			}
-// 		}
-// 		echo				'<input type=hidden name="sort" value="id" />';
-// 		echo				'<a href="javascript:document.filterid.submit();">ID';
-// 		if ($bugfilter['sort'] == "id" && $bugfilter['dir'] == "ASC" ) {
-// 			echo				'<img src="'.$picto_haut.'">';
-// 		}else if ($bugfilter['sort'] == "id" && $bugfilter['dir'] == "DESC" ) {
-// 			echo				'<img src="'.$picto_bas.'">';
-// 		}
-// 		echo 				'</a>';
-// 		echo			'</form>';
-		echo 'ID';
-		echo 		'</th>';
-		// Catégorie
-		echo		'<th width="7%">';
-// 		echo			'<form name="filtercat" method="post" action="?type='.$type.'&group_id='.$group_id.'&pluginname='.$mantisbt->name.'">';
-// 		if ($bugfilter['sort'] == "category_id" && $bugfilter['dir'] == "ASC") {
-// 			echo			'<input type=hidden name="dir" value="DESC"/>';
-// 		}else if ($bugfilter['sort'] == "category_id" && $bugfilter['dir'] == "DESC") {
-// 			echo			'<input type="hidden" name="dir" value="ASC"/>';
-// 		}
-// 		if ( isset($bugfilter['show_status'])) {
-// 			foreach ($bugfilter['show_status'] as $key => $childStatus) {
-// 				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
-// 			}
-// 		}
-// 		if ( isset($bugfilter['project_id'])) {
-// 			foreach ($bugfilter['project_id'] as $key => $childId) {
-// 				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
-// 			}
-// 		}
-// 		echo				'<input type=hidden name="sort" value="category_id" />';
-// 		echo				'<a href="javascript:document.filtercat.submit();">'._('Category');
-// 		if ($bugfilter['sort'] == "category_id" && $bugfilter['dir'] == "ASC" ) {
-// 			echo				'<img src="'.$picto_haut.'">';
-// 		}else if ($bugfilter['sort'] == "category_id" && $bugfilter['dir'] == "DESC" ) {
-// 			echo				'<img src="'.$picto_bas.'">';
-// 		}
-// 		echo 				'</a>';
-// 		echo			'</form>';
-		echo _('Category');
-		echo 		'</th>';
-		// Projet
-		echo 		'<th width="7%">';
-// 		echo			'<form name="projectid" method="post" action="?type='.$type.'&group_id='.$group_id.'&pluginname='.$mantisbt->name.'">';
-// 		if ($bugfilter['sort'] == "project_id" && $bugfilter['dir'] == "ASC") {
-// 			echo			'<input type=hidden name="dir" value="DESC"/>';
-// 		}else if ($bugfilter['sort'] == "project_id" && $bugfilter['dir'] == "DESC") {
-// 			echo			'<input type="hidden" name="dir" value="ASC"/>';
-// 		}
-// 		if ( isset($bugfilter['show_status'])) {
-// 			foreach ($bugfilter['show_status'] as $key => $childStatus) {
-// 				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
-// 			}
-// 		}
-// 		if ( isset($bugfilter['project_id'])) {
-// 			foreach ($bugfilter['project_id'] as $key => $childId) {
-// 				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
-// 			}
-// 		}
-// 		echo				'<input type=hidden name="sort" value="project_id" />';
-// 		echo				'<a href="javascript:document.projectid.submit();">'._('Project');
-// 		if ($bugfilter['sort'] == "project_id" && $bugfilter['dir'] == "ASC" ) {
-// 			echo				'<img src="'.$picto_haut.'">';
-// 		}else if ($bugfilter['sort'] == "project_id" && $bugfilter['dir'] == "DESC" ) {
-// 			echo				'<img src="'.$picto_bas.'">';
-// 		}
-// 		echo 				'</a>';
-// 		echo			'</form>';
-		echo _('Project');
-		echo 		'</th>';
-		// Sévérité
-		echo 		'<th width="7%">';
-// 		echo			'<form name="severity" method="post" action="?type='.$type.'&group_id='.$group_id.'&pluginname='.$mantisbt->name.'">';
-// 		if ($bugfilter['sort'] == "severity" && $bugfilter['dir'] == "ASC") {
-// 			echo			'<input type=hidden name="dir" value="DESC"/>';
-// 		}else if ($bugfilter['sort'] == "severity" && $bugfilter['dir'] == "DESC") {
-// 			echo			'<input type="hidden" name="dir" value="ASC"/>';
-// 		}
-// 		if ( isset($bugfilter['show_status'])) {
-// 			foreach ($bugfilter['show_status'] as $key => $childStatus) {
-// 				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
-// 			}
-// 		}
-// 		if ( isset($bugfilter['project_id'])) {
-// 			foreach ($bugfilter['project_id'] as $key => $childId) {
-// 				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
-// 			}
-// 		}
-// 		echo				'<input type=hidden name="sort" value="severity" />';
-// 		echo				'<a href="javascript:document.severity.submit();">'._('Severity');
-// 		if ($bugfilter['sort'] == "severity" && $bugfilter['dir'] == "ASC" ) {
-// 			echo				'<img src="'.$picto_haut.'">';
-// 		}else if ($bugfilter['sort'] == "severity" && $bugfilter['dir'] == "DESC" ) {
-// 			echo				'<img src="'.$picto_bas.'">';
-// 		}
-// 		echo 				'</a>';
-// 		echo			'</form>';
-		echo _('Severity');
-		echo 		'</th>';
-		// Etat
-		echo 		'<th width="15%">';
-// 		echo			'<form name="statusid" method="post" action="?type='.$type.'&group_id='.$group_id.'&pluginname='.$mantisbt->name.'">';
-// 		if ($bugfilter['sort'] == "status" && $bugfilter['dir'] == "ASC") {
-// 			echo			'<input type=hidden name="dir" value="DESC"/>';
-// 		}else if ($bugfilter['sort'] == "status" && $bugfilter['dir'] == "DESC") {
-// 			echo			'<input type="hidden" name="dir" value="ASC"/>';
-// 		}
-// 		if ( isset($bugfilter['show_status'])) {
-// 			foreach ($bugfilter['show_status'] as $key => $childStatus) {
-// 				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
-// 			}
-// 		}
-// 		if ( isset($bugfilter['project_id'])) {
-// 			foreach ($bugfilter['project_id'] as $key => $childId) {
-// 				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
-// 			}
-// 		}
-// 		echo				'<input type=hidden name="sort" value="status" />';
-// 		echo				'<a href="javascript:document.statusid.submit();">'._('Status');
-// 		if ($bugfilter['sort'] == "status" && $bugfilter['dir'] == "ASC" ) {
-// 			echo				'<img src="'.$picto_haut.'">';
-// 		}else if ($bugfilter['sort'] == "status" && $bugfilter['dir'] == "DESC" ) {
-// 			echo				'<img src="'.$picto_bas.'">';
-// 		}
-// 		echo 				'</a>';
-// 		echo			'</form>';
-		echo _('Status');
-		echo 		'</th>';
-		// Mis a jour (date)
-		echo 		'<th width="7%">';
-// 		echo			'<form name="lastupdate" method="post" action="?type='.$type.'&group_id='.$group_id.'&pluginname='.$mantisbt->name.'">';
-// 		if ($bugfilter['sort'] == "last_updated" && $bugfilter['dir'] == "ASC") {
-// 			echo			'<input type=hidden name="dir" value="DESC"/>';
-// 		}else if ($bugfilter['sort'] == "last_updated" && $bugfilter['dir'] == "DESC") {
-// 			echo			'<input type="hidden" name="dir" value="ASC"/>';
-// 		}
-// 		if ( isset($bugfilter['show_status'])) {
-// 			foreach ($bugfilter['show_status'] as $key => $childStatus) {
-// 				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
-// 			}
-// 		}
-// 		if ( isset($bugfilter['project_id'])) {
-// 			foreach ($bugfilter['project_id'] as $key => $childId) {
-// 				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
-// 			}
-// 		}
-// 		echo				'<input type=hidden name="sort" value="last_updated" />';
-// 		echo				'<a href="javascript:document.lastupdate.submit();">'._('Last update');
-// 		if ($bugfilter['sort'] == "last_updated" && $bugfilter['dir'] == "ASC" ) {
-// 			echo				'<img src="'.$picto_haut.'">';
-// 		}else if ($bugfilter['sort'] == "last_updated" && $bugfilter['dir'] == "DESC" ) {
-// 			echo				'<img src="'.$picto_bas.'">';
-// 		}
-// 		echo 				'</a>';
-// 		echo			'</form>';
-		echo _('Last update');
-		echo 		'</th>';
-		// résumé
-		echo 		'<th width="29%">';
-// 		echo			'<form name="summary" method="post" action="?type='.$type.'&group_id='.$group_id.'&pluginname='.$mantisbt->name.'">';
-// 		if ($bugfilter['sort'] == "summary" && $bugfilter['dir'] == "ASC") {
-// 			echo			'<input type=hidden name="dir" value="DESC"/>';
-// 		}else if ($bugfilter['sort'] == "summary" && $bugfilter['dir'] == "DESC") {
-// 			echo			'<input type="hidden" name="dir" value="ASC"/>';
-// 		}
-// 		if ( isset($bugfilter['show_status'])) {
-// 			foreach ($bugfilter['show_status'] as $key => $childStatus) {
-// 				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
-// 			}
-// 		}
-// 		if ( isset($bugfilter['project_id'])) {
-// 			foreach ($bugfilter['project_id'] as $key => $childId) {
-// 				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
-// 			}
-// 		}
-// 		echo				'<input type=hidden name="sort" value="summary" />';
-// 		echo				'<a href="javascript:document.summary.submit();">'._('Summary');
-// 		if ($bugfilter['sort'] == "summary" && $bugfilter['dir'] == "ASC" ) {
-// 			echo				'<img src="'.$picto_haut.'">';
-// 		}else if ($bugfilter['sort'] == "summary" && $bugfilter['dir'] == "DESC" ) {
-// 			echo				'<img src="'.$picto_bas.'">';
-// 		}
-// 		echo 				'</a>';
-// 		echo			'</form>';
-		echo _('Summary');
-		echo 		'</th>';
-/* currently informations are missing in header
-		// version de détection
-		echo 		'<th width="6%">';
-		echo			'<form name="version" method="post" action="?type='.$type.'&group_id='.$group_id.'&pluginname='.$mantisbt->name.'">';
-		if ($bugfilter['sort'] == "version" && $bugfilter['dir'] == "ASC") {
-			echo			'<input type=hidden name="dir" value="DESC"/>';
-		}else if ($bugfilter['sort'] == "version" && $bugfilter['dir'] == "DESC") {
-			echo			'<input type="hidden" name="dir" value="ASC"/>';
-		}
-		if ( isset($bugfilter['show_status'])) {
-			foreach ($bugfilter['show_status'] as $key => $childStatus) {
-				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
-			}
-		}
-		if ( isset($bugfilter['project_id'])) {
-			foreach ($bugfilter['project_id'] as $key => $childId) {
-				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
-			}
-		}
-		echo				'<input type=hidden name="sort" value="version" />';
-		echo				'<a href="javascript:document.version.submit();">'._('Detected in');
-		if ($bugfilter['sort'] == "version" && $bugfilter['dir'] == "ASC" ){
-			echo				'<img src="'.$picto_haut.'">';
-		}else if ($bugfilter['sort'] == "version" && $bugfilter['dir'] == "DESC" ) {
-			echo				'<img src="'.$picto_bas.'">';
-		}
-		echo 				'</a>';
-		echo			'</form>';
-		echo 		'</th>';
-		// corrigé en version
-		echo		'<th width="6%">';
-		echo			'<form name="fixed" method="post" action="?type='.$type.'&group_id='.$group_id.'&pluginname='.$mantisbt->name.'">';
-		if ($bugfilter['sort'] == "fixed_in_version" && $bugfilter['dir'] == "ASC") {
-			echo			'<input type=hidden name="dir" value="DESC"/>';
-		}else if ($bugfilter['sort'] == "fixed_in_version" && $bugfilter['dir'] == "DESC") {
-			echo			'<input type="hidden" name="dir" value="ASC"/>';
-		}
-		if ( isset($bugfilter['show_status'])) {
-			foreach ($bugfilter['show_status'] as $key => $childStatus) {
-				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
-			}
-		}
-		if ( isset($bugfilter['project_id'])) {
-			foreach ($bugfilter['project_id'] as $key => $childId) {
-				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
-			}
-		}
-		echo				'<input type=hidden name="sort" value="fixed_in_version" />';
-		echo				'<a href="javascript:document.fixed.submit();">'._('Fixed in');
-		if ($bugfilter['sort'] == "fixed_in_version" && $bugfilter['dir'] == "ASC" ){
-			echo				'<img src="'.$picto_haut.'">';
-		}else if ($bugfilter['sort'] == "fixed_in_version" && $bugfilter['dir'] == "DESC" ) {
-			echo				'<img src="'.$picto_bas.'">';
-		}
-		echo 				'</a>';
-		echo			'</form>';
-		echo 		'</th>';
-		// version cible : Milestone
-		echo		'<th width="6%">';
-		echo			'<form name="target" method="post" action="?type='.$type.'&group_id='.$group_id.'&pluginname='.$mantisbt->name.'">';
-		if ($bugfilter['sort'] == "target_version" && $bugfilter['dir'] == "ASC") {
-			echo			'<input type=hidden name="dir" value="DESC"/>';
-		}else if ($bugfilter['sort'] == "target_version" && $bugfilter['dir'] == "DESC") {
-			echo			'<input type="hidden" name="dir" value="ASC"/>';
-		}
-		if ( isset($bugfilter['show_status'])) {
-			foreach ($bugfilter['show_status'] as $key => $childStatus) {
-				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
-			}
-		}
-		if ( isset($bugfilter['project_id'])) {
-			foreach ($bugfilter['project_id'] as $key => $childId) {
-				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
-			}
-		}
-		echo				'<input type=hidden name="sort" value="target_version" />';
-		echo				'<a href="javascript:document.target.submit();">'._('Target');
-		if ($bugfilter['sort'] == "target_version" && $bugfilter['dir'] == "ASC" ){
-			echo				'<img src="'.$picto_haut.'">';
-		}else if ($bugfilter['sort'] == "target_version" && $bugfilter['dir'] == "DESC" ) {
-			echo				'<img src="'.$picto_bas.'">';
-		}
-		echo 				'</a>';
-		echo			'</form>';
-		echo 		'</th>';
-*/
-		echo	'</tr>';
-		$cpt = 0;
-		$format = "%07d";
+		$titleArray = array();
+		$thTitleArray = array();
+		$thOtherAttrsArray = array();
+		$titleArray[] = 'P';
+		$thTitleArray[] = _('Priority');
+		$thOtherAttrsArray[] = array('width' => '2%');
+		$titleArray[] = 'ID';
+		$thTitleArray[] = _('Bug ID');
+		$thOtherAttrsArray[] = array('width' => '3%');
+		$titleArray[] = _('Category');
+		$thTitleArray[] = '';
+		$thOtherAttrsArray[] = array('width' => '7%');
+		$titleArray[] = _('Project');
+		$thTitleArray[] = '';
+		$thOtherAttrsArray[] = array('width' => '7%');
+		$titleArray[] =  _('Severity');
+		$thTitleArray[] = '';
+		$thOtherAttrsArray[] = array('width' => '7%');
+		$titleArray[] =  _('Status');
+		$thTitleArray[] = '';
+		$thOtherAttrsArray[] = array('width' => '15%');
+		$titleArray[] =  _('Last Update');
+		$thTitleArray[] = '';
+		$thOtherAttrsArray[] = array('width' => '7%');
+		$titleArray[] =  _('Summary');
+		$thTitleArray[] = '';
+		$thOtherAttrsArray[] = array('width' => '29%');
+		echo $HTML->listTableTop($titleArray, array(), 'sortable_listissues full', 'sortable', array(), $thTitleArray, $thOtherAttrsArray);
 		foreach($listBug as $key => $bug) {
-			$nbligne++;
-			echo '<tr '.$HTML->boxGetAltRowStyle($nbligne).'">';
+			$cells = array();
 			if($prioritiesImg[$bug['idPriority']] != "") {
-				echo		'<td><img src="./img/'.$prioritiesImg[$bug['idPriority']].'"></td>';
+				$cells[][] = '<img src="./img/'.$prioritiesImg[$bug['idPriority']].'">';
 			}else{
-				echo		'<td></td>';
+				$cells[][] = '';
 			}
-			echo		'<td>'.util_make_link('/plugins/'.$mantisbt->name.'/?type='.$type.'&group_id='.$group_id.'&idBug='.$bug['id'].'&view=viewIssue', sprintf($format,$bug['id'])).'</td>';
-			echo 		'<td>'.$bug['category'].'</td>';
-			echo 		'<td>'.$bug['project'].'</td>';
-			echo 		'<td>';
+			$cells[][] = util_make_link('/plugins/'.$mantisbt->name.'/?type='.$type.'&group_id='.$group_id.'&idBug='.$bug['id'].'&view=viewIssue', $bug['id']);
+			$cells[][] = $bug['category'];
+			$cells[][] = $bug['project'];
+			$content = '';
 			if($bug['severityId'] > 50) {
-				echo		'<b>';
+				$content .= '<b>';
 			}
-			echo			$bug['severityId'];
+			$content .= $bug['severityId'];
 			if($bug['severityId'] > 50) {
-				echo		'</b>';
+				$content .= '</b>';
 			}
-			echo		'</td>';
-			echo 		'<td>'.$bug['status_name'].'</td>';
-			echo 		'<td>'.strftime(_('%d/%m/%Y'),strtotime($bug['last_updated'])).'</td>';
-			echo 		'<td>'.$bug['summary'];
+			$cells[][] = $content;
+			$cells[][] = $bug['status_name'];
+			$cells[][] = strftime(_('%d/%m/%Y'),strtotime($bug['last_updated']));
+			$content = $bug['summary'];
 			if ($bug['view_state'] == 50) {
-				echo '<img src="./img/protected.gif">';
+				$content .= '<img src="./img/protected.gif">';
 			}
-			echo 		'</td>';
-/*
-			echo 		'<td>'.$bug['version'].'</td>';
-			echo 		'<td>'.$bug['fixed_in_version'].'</td>';
-			echo 		'<td>'.$bug['target_version'].'</td>';
-*/
-			echo	'</tr>';
-			$cpt ++;
+			$cells[][] = $content;
+			echo $HTML->multiTableRow(array(), $cells);
 		}
-		echo "</table><br/>";
+		echo $HTML->listTableBottom();
 	}
 
 	// Add new issue
-	if ($type == "group" && $editable) {
+	if ($type == 'group' && $editable) {
 	?>
 		<p class="notice_title" onclick='jQuery("#expandable_ticket").slideToggle(300);'><?php echo _('Add a new ticket') ?></p>
 		<div id='expandable_ticket' class="notice_content">

-----------------------------------------------------------------------

Summary of changes:
 src/plugins/mantisbt/view/viewIssues.php |  416 ++++--------------------------
 1 file changed, 57 insertions(+), 359 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list