r97227 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97226‎ | r97227 | r97228 >
Date:01:02, 16 September 2011
Author:jeroendedauw
Status:ok
Tags:
Comment:
fix to table format; I failed - difference is because of wikitext vs html, not MW version
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
@@ -61,14 +61,14 @@
6262 $headers[] = Html::rawElement(
6363 'th',
6464 $attribs,
65 - $pr->getText( $outputmode, ( $this->mShowHeaders == SMW_HEADERS_PLAIN ? null:$this->mLinker ) )
 65+ $pr->getText( $outputmode, ( $this->mShowHeaders == SMW_HEADERS_PLAIN ? null : $this->mLinker ) )
6666 );
6767 }
6868
6969 $headers = '<tr>' . implode( "\n", $headers ) . '</tr>';
7070
7171 // MW 1.17 and earlier do not accept thead while later versions require it.
72 - if ( version_compare( $wgVersion, '1.18', '>=' ) ) {
 72+ if ( $outputmode == SMW_OUTPUT_HTML ) {
7373 $headers = '<thead>' . $headers . '</thead>';
7474 }
7575
@@ -78,7 +78,7 @@
7979 $tableRows = implode( "\n", $tableRows );
8080
8181 // MW 1.17 and earlier do not accept thead while later versions require it.
82 - if ( version_compare( $wgVersion, '1.18', '>=' ) ) {
 82+ if ( $outputmode == SMW_OUTPUT_HTML ) {
8383 $tableRows = '<tbody>' . $tableRows . '</tbody>';
8484 }
8585

Follow-up revisions

RevisionCommit summaryAuthorDate
r97228Follow up to r97227;jeroendedauw01:14, 16 September 2011

Status & tagging log