r101782 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101781‎ | r101782 | r101783 >
Date:02:53, 3 November 2011
Author:yaron
Status:deferred
Tags:
Comment:
Fix for r100738 - added handling if CSS classes for columns aren't set
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Table.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Table.php
@@ -4,7 +4,7 @@
55 * Print query results in tables.
66 *
77 * @author Markus Krötzsch
8 - * @author Jeroen De Dauw < jeroendedauw@gmail.com >
 8+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
99 *
1010 * @file
1111 * @ingroup SMWQuery
@@ -117,7 +117,13 @@
118118 $cells = array();
119119
120120 foreach ( $subject as $i => $field ) {
121 - $columnClass = $columnClasses[$i];
 121+ // $columnClasses will be empty if "headers=hide"
 122+ // was set.
 123+ if ( array_key_exists( $i, $columnClasses ) ) {
 124+ $columnClass = $columnClasses[$i];
 125+ } else {
 126+ $columnClass = null;
 127+ }
122128 $cells[] = $this->getCellForPropVals( $field, $outputmode, $columnClass );
123129 }
124130

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100738Added setting of CSS "column class" for every cell in the tableyaron20:22, 25 October 2011