http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97288
Revision: 97288 Author: jeroendedauw Date: 2011-09-16 15:12:40 +0000 (Fri, 16 Sep 2011) Log Message: ----------- 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 trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_List.php trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUI.php Modified: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Category.php =================================================================== --- trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Category.php 2011-09-16 15:12:10 UTC (rev 97287) +++ trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Category.php 2011-09-16 15:12:40 UTC (rev 97288) @@ -69,9 +69,14 @@ $cur_first_char = $wgContLang->firstChar( $sortkey == '' ? $content[0]->getDBkey() : $sortkey ); if ( $rowindex % $rows_per_column == 0 ) { - $result .= "\n <div style=\"float: left; width: $column_width%;\">\n"; - if ( $cur_first_char == $prev_first_char ) + $result .= Html::openElement( 'div', array( 'style' => array( + 'float' => 'left', + 'width' => "$column_width%" + ) ) ); + + if ( $cur_first_char == $prev_first_char ) { $result .= " <h3>$cur_first_char " . wfMsg( 'listingcontinuesabbrev' ) . "</h3>\n <ul>\n"; + } } // if we're at a new first letter, end Modified: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_List.php =================================================================== --- trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_List.php 2011-09-16 15:12:10 UTC (rev 97287) +++ trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_List.php 2011-09-16 15:12:40 UTC (rev 97288) @@ -106,7 +106,14 @@ // Set up floating divs, if there's more than one column if ( $this->mColumns > 1 ) { $column_width = floor( 100 / $this->mColumns ); - $result .= '<div style="float: left; width: ' . $column_width . '%">' . "\n"; + + $result .= Html::openElement( + 'div', + array( + 'style' => array( 'float' => 'left', 'width' => "$column_width%" ) + ) + ); + $rows_per_column = ceil( $res->getCount() / $this->mColumns ); $rows_in_cur_column = 0; } Modified: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUI.php =================================================================== --- trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUI.php 2011-09-16 15:12:10 UTC (rev 97287) +++ trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUI.php 2011-09-16 15:12:40 UTC (rev 97288) @@ -525,9 +525,11 @@ } $result .= Html::openElement( 'div', - array( 'id' => 'smwmainlabel', + array( + 'id' => 'smwmainlabel', 'class' => 'smwsort', - 'style' => "display:$formDisplay;" ) + 'style' => array( 'display' => $formDisplay ) + ) ) . Html::openElement( 'span', array( 'class' => 'smwquisortlabel' ) ) . @@ -1728,7 +1730,7 @@ $resultHtml .= Html::rawElement( 'div', array( - 'style' => 'background: ' . ( $flipStyle ? 'white' : '#dddddd' ) . ';' + 'style' => array( 'background' => $flipStyle ? 'white' : '#dddddd' ) ) ), $rowHtml ); _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs