Index: trunk/phase3/includes/specials/SpecialSearch.php |
— | — | @@ -586,7 +586,7 @@ |
587 | 587 | * @return $out string: HTML form |
588 | 588 | */ |
589 | 589 | function powerSearchBox( $term ) { |
590 | | - global $wgScript; |
| 590 | + global $wgScript, $wgContLang; |
591 | 591 | |
592 | 592 | $namespaces = SearchEngine::searchableNamespaces(); |
593 | 593 | |
— | — | @@ -613,11 +613,16 @@ |
614 | 614 | // be arranged nicely while still accommodating different screen widths |
615 | 615 | $rowsPerTable = 3; // seems to look nice |
616 | 616 | |
| 617 | + // float to the right on RTL wikis |
| 618 | + $tableStyle = ( $wgContLang->isRTL() ? |
| 619 | + 'float: right; margin: 0 0 1em 1em' : |
| 620 | + 'float: left; margin: 0 1em 1em 0' ); |
| 621 | + |
617 | 622 | $tables = ""; |
618 | 623 | for( $i = 0; $i < $numRows; $i += $rowsPerTable ) { |
619 | | - $tables .= Xml::openElement( 'table', array( 'style' => 'float: left; margin: 0 1em 1em 0' ) ); |
| 624 | + $tables .= Xml::openElement( 'table', array( 'style' => $tableStyle ) ); |
620 | 625 | for( $j = $i; $j < $i + $rowsPerTable && $j < $numRows; $j++ ) { |
621 | | - $tables .= Xml::openElement( 'tr' ) . "\n" . $rows[$j] . Xml::closeElement( 'tr' ); |
| 626 | + $tables .= "<tr>\n" . $rows[$j] . "</tr>"; |
622 | 627 | } |
623 | 628 | $tables .= Xml::closeElement( 'table' ) . "\n"; |
624 | 629 | } |
— | — | @@ -635,7 +640,7 @@ |
636 | 641 | wfMsgExt( 'powersearch-ns', array( 'parseinline' ) ) . |
637 | 642 | "</p>\n" . |
638 | 643 | $tables . |
639 | | - "<hr style=\"clear: left;\" />\n" . |
| 644 | + "<hr style=\"clear: both\" />\n" . |
640 | 645 | "<p>" . |
641 | 646 | $redirect . " " . $redirectLabel . |
642 | 647 | "</p>\n" . |