From: Jeroen De Dauw Date: Thu, 23 Feb 2012 22:58:11 +0000 (+0000) Subject: fix doc, this is not an array X-Git-Tag: 1.31.0-rc.0~24552 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=80540755139377262483448d4dbc2e5885bfd18f;p=lhc%2Fweb%2Fwiklou.git fix doc, this is not an array --- diff --git a/includes/Pager.php b/includes/Pager.php index 91676e7422..f9231d58d9 100644 --- a/includes/Pager.php +++ b/includes/Pager.php @@ -925,22 +925,27 @@ abstract class TablePager extends IndexPager { /** * @protected - * @param $row Array + * @param stdClass $row * @return String HTML */ function formatRow( $row ) { - $this->mCurrentRow = $row; # In case formatValue etc need to know + $this->mCurrentRow = $row; // In case formatValue etc need to know $s = Xml::openElement( 'tr', $this->getRowAttrs( $row ) ); $fieldNames = $this->getFieldNames(); + foreach ( $fieldNames as $field => $name ) { $value = isset( $row->$field ) ? $row->$field : null; $formatted = strval( $this->formatValue( $field, $value ) ); + if ( $formatted == '' ) { $formatted = ' '; } + $s .= Xml::tags( 'td', $this->getCellAttrs( $field, $value ), $formatted ); } + $s .= "\n"; + return $s; }