[Fusionforge-commits] r11305 - trunk/src/www/forum

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Tue Nov 2 11:59:27 CET 2010


Author: aljeux
Date: 2010-11-02 11:59:27 +0100 (Tue, 02 Nov 2010)
New Revision: 11305

Modified:
   trunk/src/www/forum/myforums.php
Log:
Remove description col in myforums, bad display when used when monitoring news.

Modified: trunk/src/www/forum/myforums.php
===================================================================
--- trunk/src/www/forum/myforums.php	2010-11-02 10:59:21 UTC (rev 11304)
+++ trunk/src/www/forum/myforums.php	2010-11-02 10:59:27 UTC (rev 11305)
@@ -68,12 +68,12 @@
 	$monitored_forums[$i] = db_fetch_array($result);
 }
 
-$tablearr=array(_('Project'),_('Forum'),
-				_('Description'),_('Threads'),
+$tablearr=array(_('Project'),_('Forum'), _('Threads'),
 				_('Posts'), _('Last Post'), _('New Content?'));
 echo $HTML->listTableTop($tablearr);
 
 $i = 0;
+$j = 0;
 
 $f = array();
 //CHECK : if we won't ever be needing to store each forum/fmf, etc for each pass, don't use an array and use the same variable like $fmf instead of $fmf[$i], etc
@@ -106,11 +106,12 @@
 		}	elseif ($fmf->isError()) {
 			exit_error($fmf->getErrorMessage(),'forums');
 		}
+
 		$fmf->setUp($offset,$style,$max_rows,$set);
 		$style=$fmf->getStyle();
 		$max_rows=$fmf->max_rows;
 		$offset=$fmf->offset;
-		$msg_arr =& $fmf->nestArray($fmf->getNested());
+		$msg_arr = $fmf->nestArray($fmf->getNested());
 		if ($fmf->isError()) {
 			exit_error($fmf->getErrorMessage(),'forums');
 		}
@@ -119,45 +120,47 @@
 		if ($rows > $max_rows) {
 			$rows=$max_rows;
 		}
-		$j=0;
-		$newcontent = "<center>---</center>";
+
+		$newcontent = '&nbsp;';
 		//this loops through every message AND followup, in search of new messages.
 		//anything that's new ( new thread or followup) is considered to be a "new thing" and the forum
 		//is considered to have new contents
+		if (!empty($msg_arr)) {
 		foreach ($msg_arr as $forum_msg_arr) {
 			foreach ($forum_msg_arr as $forum_msg) {
 				if ($f->getSavedDate() < $forum_msg->getPostDate()) {
 				//we've got ourselves a new message or followup for this forum. note that, exit the search
-				$newcontent = "<center>" . html_image("ic/new.png","25","11") . "</center>";
+						$newcontent = "<center>" . html_image('ic/new.png','', '', array('alt' => 'new')) . "</center>";
 				break;
 				}
 			}
-			if ($newcontent!="<center>---</center>") {
+				if ($newcontent != '&nbsp;') {
 				break;
 			}
 		}
+		}
 		/*while (($j < $rows) && ($total_rows < $max_rows)) {
 			$msg =& $msg_arr["0"][$j];
 			$total_rows++;
 			if ($f->getSavedDate() < $msg->getPostDate()) {
 				//we've got ourselves a new message for this forum. note that, exit the search
-				$newcontent = "<center>" . html_image("ic/new.png","25","11") . "</center>";
+				$newcontent = "<center>" . html_image('ic/new.png','', '', array('alt' => 'new')) . "</center>";
 				break;
 			}
 			$j++;
 		}*/
 
 		$this_forum_group = $f->getGroup();
-		echo '<tr '. $HTML->boxGetAltRowStyle($j) . '>
+		$date = $f->getMostRecentDate()? date(_('Y-m-d H:i'),$f->getMostRecentDate()) : '';
+		echo '<tr '. $HTML->boxGetAltRowStyle($j++) . '>
 			<td>' . $this_forum_group->getPublicName() . '</td>
 			<td><a href="forum.php?forum_id='. $f->getID() .'">'.
 			html_image("ic/forum20w.png","20","20") .
 			'&nbsp;' .
 			$f->getName() .'</a></td>
-			<td>'.$f->getDescription().'</td>
 			<td style="text-align:center">'.$f->getThreadCount().'</td>
 			<td style="text-align:center">'. $f->getMessageCount() .'</td>
-			<td>'.  date(_('Y-m-d H:i'),$f->getMostRecentDate()) .'</td>
+			<td style="text-align:center">'. $date .'</td>
 			<td>' . $newcontent . '</td></tr>';
 	}
 }




More information about the Fusionforge-commits mailing list