X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialSearch.php;h=41828464e7d65cacbc84b5a197cf6e0e7b118b0c;hb=ff120603ba6b717f147cde8d51c3998522a25aaf;hp=94995db3409fcbd268ecc68c098c4a28c7d985e0;hpb=f7c5ef1307141bdd9bdcc96496fd61ab269e65be;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 94995db340..41828464e7 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -875,6 +875,8 @@ class SpecialSearch extends SpecialPage { * @return String: HTML form */ protected function powerSearchBox( $term, $opts ) { + global $wgContLang; + // Groups namespaces into rows according to subject $rows = array(); foreach ( SearchEngine::searchableNamespaces() as $namespace => $name ) { @@ -882,10 +884,12 @@ class SpecialSearch extends SpecialPage { if ( !array_key_exists( $subject, $rows ) ) { $rows[$subject] = ""; } - $name = str_replace( '_', ' ', $name ); + + $name = $wgContLang->getConverter()->convertNamespace( $namespace ); if ( $name == '' ) { $name = $this->msg( 'blanknamespace' )->text(); } + $rows[$subject] .= Xml::openElement( 'td', array( 'style' => 'white-space: nowrap' ) @@ -898,6 +902,7 @@ class SpecialSearch extends SpecialPage { ) . Xml::closeElement( 'td' ); } + $rows = array_values( $rows ); $numRows = count( $rows ); @@ -909,9 +914,11 @@ class SpecialSearch extends SpecialPage { 'table', array( 'cellpadding' => 0, 'cellspacing' => 0 ) ); + for ( $j = $i; $j < $i + 4 && $j < $numRows; $j++ ) { $namespaceTables .= Xml::tags( 'tr', null, $rows[$j] ); } + $namespaceTables .= Xml::closeElement( 'table' ); } @@ -1183,6 +1190,6 @@ class SpecialSearch extends SpecialPage { } protected function getGroupName() { - return 'redirects'; + return 'pages'; } }