[Fusionforge-commits] r16112 - branches/Branch_5_1/src/www/mail

Franck VILLAUME nerville at fusionforge.org
Sat Aug 18 14:43:49 CEST 2012


Author: nerville
Date: 2012-08-18 14:43:48 +0200 (Sat, 18 Aug 2012)
New Revision: 16112

Modified:
   branches/Branch_5_1/src/www/mail/index.php
Log:
fix #457: Hide "permission denied" for non public mailing list, patch from French National Education Department

Modified: branches/Branch_5_1/src/www/mail/index.php
===================================================================
--- branches/Branch_5_1/src/www/mail/index.php	2012-08-18 12:20:51 UTC (rev 16111)
+++ branches/Branch_5_1/src/www/mail/index.php	2012-08-18 12:43:48 UTC (rev 16112)
@@ -6,6 +6,7 @@
  * Copyright 2003-2004 (c) Guillaume Smet - Open Wide
  * Copyright 2010 (c) Franck Villaume - Capgemini
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
+ * Copyright 2012, Jean-Christophe Masson - French National Education Department
  * http://fusionforge.org/
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -81,23 +82,25 @@
 
 	for ($j = 0; $j < $mlCount; $j++) {
 		$currentList =& $mlArray[$j];
-		echo '<tr '. $HTML->boxGetAltRowStyle($j) .'>';
-		if ($currentList->isError()) {
-			echo '<td colspan="3">'.$currentList->getErrorMessage().'</td>';
-		} else if($currentList->getStatus() == MAIL__MAILING_LIST_IS_REQUESTED) {
-			echo '<td width="33%">'.
-				'<strong>'.$currentList->getName().'</strong></td>'.
-				'<td width="33%">'.htmlspecialchars($currentList->getDescription()). '</td>'.
-				'<td width="33%" style="text-align:center">'._('Not activated yet').'</td>';
-		} else {
-			echo '<td width="33%">'.
-				'<strong><a href="'.$currentList->getArchivesUrl().'">' .
-				sprintf(_('%1$s Archives'), $currentList->getName()).'</a></strong></td>'.
-				'<td>'.htmlspecialchars($currentList->getDescription()). '</td>'.
-				'<td width="33%" style="text-align:center"><a href="'.$currentList->getExternalInfoUrl().'">'._('Subscribe/Unsubscribe/Preferences').'</a>'.
-				'</td>';
+		if (!$currentList->isPermissionDeniedError()) {
+			echo '<tr '. $HTML->boxGetAltRowStyle($j) .'>';
+			if ($currentList->isError()) {
+				echo '<td colspan="3">'.$currentList->getErrorMessage().'</td>';
+			} else if($currentList->getStatus() == MAIL__MAILING_LIST_IS_REQUESTED) {
+				echo '<td width="33%">'.
+					'<strong>'.$currentList->getName().'</strong></td>'.
+					'<td width="33%">'.htmlspecialchars($currentList->getDescription()). '</td>'.
+					'<td width="33%" style="text-align:center">'._('Not activated yet').'</td>';
+			} else {
+				echo '<td width="33%">'.
+					'<strong><a href="'.$currentList->getArchivesUrl().'">' .
+					sprintf(_('%1$s Archives'), $currentList->getName()).'</a></strong></td>'.
+					'<td>'.htmlspecialchars($currentList->getDescription()). '</td>'.
+					'<td width="33%" style="text-align:center"><a href="'.$currentList->getExternalInfoUrl().'">'._('Subscribe/Unsubscribe/Preferences').'</a>'.
+					'</td>';
+			}
+			echo '</tr>';
 		}
-		echo '</tr>';
 	}
 
 	echo $HTML->listTableBottom();




More information about the Fusionforge-commits mailing list