From 03d94a6e4c5dfaa905e70e155e8d57f50d93338a Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Tue, 1 Feb 2005 01:41:30 +0000 Subject: [PATCH] Do not output lines for which nothing is formatted (formatResult returning false) --- includes/QueryPage.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/QueryPage.php b/includes/QueryPage.php index 90954ceb9a..335b279f16 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -185,9 +185,11 @@ class QueryPage { # Only read at most $num rows, because $res may contain the whole 1000 for ( $i = 0; $i < $num && $obj = $dbr->fetchObject( $res ); $i++ ) { $format = $this->formatResult( $sk, $obj ); - $attr = ( isset ( $obj->usepatrol ) && $obj->usepatrol && - $obj->patrolled == 0 ) ? ' class="not-patrolled"' : ''; - $s .= "{$format}\n"; + if ( $format ) { + $attr = ( isset ( $obj->usepatrol ) && $obj->usepatrol && + $obj->patrolled == 0 ) ? ' class="not-patrolled"' : ''; + $s .= "{$format}\n"; + } } $dbr->freeResult( $res ); $s .= ''; -- 2.20.1