r97288 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97287‎ | r97288 | r97289 >
Date:15:12, 16 September 2011
Author:jeroendedauw
Status:reverted
Tags:
Comment:
use style args that are escaped; not strictrly needed here as the vars have already been sanitized, but good practice won't hurt
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Category.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_List.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUI.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUI.php
@@ -525,9 +525,11 @@
526526 }
527527 $result .= Html::openElement(
528528 'div',
529 - array( 'id' => 'smwmainlabel',
 529+ array(
 530+ 'id' => 'smwmainlabel',
530531 'class' => 'smwsort',
531 - 'style' => "display:$formDisplay;" )
 532+ 'style' => array( 'display' => $formDisplay )
 533+ )
532534 ) .
533535 Html::openElement( 'span',
534536 array( 'class' => 'smwquisortlabel' ) ) .
@@ -1728,7 +1730,7 @@
17291731 $resultHtml .= Html::rawElement(
17301732 'div',
17311733 array(
1732 - 'style' => 'background: ' . ( $flipStyle ? 'white' : '#dddddd' ) . ';'
 1734+ 'style' => array( 'background' => $flipStyle ? 'white' : '#dddddd' ) )
17331735 ),
17341736 $rowHtml
17351737 );
Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_List.php
@@ -106,7 +106,14 @@
107107 // Set up floating divs, if there's more than one column
108108 if ( $this->mColumns > 1 ) {
109109 $column_width = floor( 100 / $this->mColumns );
110 - $result .= '<div style="float: left; width: ' . $column_width . '%">' . "\n";
 110+
 111+ $result .= Html::openElement(
 112+ 'div',
 113+ array(
 114+ 'style' => array( 'float' => 'left', 'width' => "$column_width%" )
 115+ )
 116+ );
 117+
111118 $rows_per_column = ceil( $res->getCount() / $this->mColumns );
112119 $rows_in_cur_column = 0;
113120 }
Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Category.php
@@ -69,9 +69,14 @@
7070 $cur_first_char = $wgContLang->firstChar( $sortkey == '' ? $content[0]->getDBkey() : $sortkey );
7171
7272 if ( $rowindex % $rows_per_column == 0 ) {
73 - $result .= "\n <div style=\"float: left; width: $column_width%;\">\n";
74 - if ( $cur_first_char == $prev_first_char )
 73+ $result .= Html::openElement( 'div', array( 'style' => array(
 74+ 'float' => 'left',
 75+ 'width' => "$column_width%"
 76+ ) ) );
 77+
 78+ if ( $cur_first_char == $prev_first_char ) {
7579 $result .= " <h3>$cur_first_char " . wfMsg( 'listingcontinuesabbrev' ) . "</h3>\n <ul>\n";
 80+ }
7681 }
7782
7883 // if we're at a new first letter, end

Follow-up revisions

RevisionCommit summaryAuthorDate
r97290revert r97288; interface is proposed but does not exist yet - I failedjeroendedauw15:20, 16 September 2011

Status & tagging log