[Fusionforge-commits] r10610 - trunk/src/www/forum/include

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Tue Sep 21 22:00:00 CEST 2010


Author: aljeux
Date: 2010-09-21 22:00:00 +0200 (Tue, 21 Sep 2010)
New Revision: 10610

Modified:
   trunk/src/www/forum/include/ForumHTML.class.php
Log:
Use static function purify if possible.

Modified: trunk/src/www/forum/include/ForumHTML.class.php
===================================================================
--- trunk/src/www/forum/include/ForumHTML.class.php	2010-09-21 19:39:13 UTC (rev 10609)
+++ trunk/src/www/forum/include/ForumHTML.class.php	2010-09-21 20:00:00 UTC (rev 10610)
@@ -69,7 +69,7 @@
 				if (!$group || !is_object($group) || $group->isError()) {
 					exit_no_group();
 				}
-				echo '
+				echo '<p>
 				<strong>'._('Posted by').':</strong> '.$user->getRealName().'<br />
 				<strong>'._('Date').':</strong> '. date(_('Y-m-d H:i'),db_result($result,0,'post_date')).'<br />
 				<strong>'._('Summary').':</strong>'.
@@ -77,11 +77,10 @@
 							db_result($result,0,'summary')).'<br/>
 				<strong>'._('Project').':</strong>'.
 					util_make_link_g ($group->getUnixName(),db_result($result,0,'group_id'),$group->getPublicName()).'<br />
-				<p>
+				</p>
 				';
 				$body = db_result($result,0,'details');
-				$sanitizer = new TextSanitizer();
-				$body = $sanitizer->purify($body);
+				$body = TextSanitizer::purify($body);
 				if (!strstr($body,'<')) {
 					//backwards compatibility for non html messages
 					echo util_make_links(nl2br($body)); 
@@ -89,8 +88,6 @@
 					echo util_make_links($body);
 				}
 
-				echo '</p>';
-
 				// display classification
 				if ($params['group'] == forge_get_config('news_group')) { 
 				   print stripslashes(trove_news_getcatlisting(db_result($result,0,'forum_id'),0,1));




More information about the Fusionforge-commits mailing list