Revision: 43561
Author: vyznev
Date: 2008-11-15 18:12:40 +0000 (Sat, 15 Nov 2008)
Log Message:
-----------
minor fix for r43517: float tables to the right on RTL wikis
Modified Paths:
--------------
trunk/phase3/includes/specials/SpecialSearch.php
Modified: trunk/phase3/includes/specials/SpecialSearch.php
===================================================================
--- trunk/phase3/includes/specials/SpecialSearch.php 2008-11-15 17:32:46 UTC
(rev 43560)
+++ trunk/phase3/includes/specials/SpecialSearch.php 2008-11-15 18:12:40 UTC
(rev 43561)
@@ -586,7 +586,7 @@
* @return $out string: HTML form
*/
function powerSearchBox( $term ) {
- global $wgScript;
+ global $wgScript, $wgContLang;
$namespaces = SearchEngine::searchableNamespaces();
@@ -613,11 +613,16 @@
// be arranged nicely while still accommodating different
screen widths
$rowsPerTable = 3; // seems to look nice
+ // float to the right on RTL wikis
+ $tableStyle = ( $wgContLang->isRTL() ?
+ 'float: right; margin: 0 0 1em 1em' :
+ 'float: left; margin: 0 1em 1em 0' );
+
$tables = "";
for( $i = 0; $i < $numRows; $i += $rowsPerTable ) {
- $tables .= Xml::openElement( 'table', array( 'style' =>
'float: left; margin: 0 1em 1em 0' ) );
+ $tables .= Xml::openElement( 'table', array( 'style' =>
$tableStyle ) );
for( $j = $i; $j < $i + $rowsPerTable && $j < $numRows;
$j++ ) {
- $tables .= Xml::openElement( 'tr' ) . "\n" .
$rows[$j] . Xml::closeElement( 'tr' );
+ $tables .= "<tr>\n" . $rows[$j] . "</tr>";
}
$tables .= Xml::closeElement( 'table' ) . "\n";
}
@@ -635,7 +640,7 @@
wfMsgExt( 'powersearch-ns', array(
'parseinline' ) ) .
"</p>\n" .
$tables .
- "<hr style=\"clear: left;\" />\n" .
+ "<hr style=\"clear: both\" />\n" .
"<p>" .
$redirect . " " . $redirectLabel .
"</p>\n" .
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs