Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Table.php |
— | — | @@ -61,14 +61,14 @@ |
62 | 62 | $headers[] = Html::rawElement( |
63 | 63 | 'th', |
64 | 64 | $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 ) ) |
66 | 66 | ); |
67 | 67 | } |
68 | 68 | |
69 | 69 | $headers = '<tr>' . implode( "\n", $headers ) . '</tr>'; |
70 | 70 | |
71 | 71 | // 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 ) { |
73 | 73 | $headers = '<thead>' . $headers . '</thead>'; |
74 | 74 | } |
75 | 75 | |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | $tableRows = implode( "\n", $tableRows ); |
80 | 80 | |
81 | 81 | // 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 ) { |
83 | 83 | $tableRows = '<tbody>' . $tableRows . '</tbody>'; |
84 | 84 | } |
85 | 85 | |