From: Antoine Musso Date: Tue, 1 Feb 2005 01:41:30 +0000 (+0000) Subject: Do not output lines for which nothing is formatted (formatResult returning false) X-Git-Tag: 1.5.0alpha1~792 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=03d94a6e4c5dfaa905e70e155e8d57f50d93338a;p=lhc%2Fweb%2Fwiklou.git Do not output lines for which nothing is formatted (formatResult returning false) --- 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 .= '';