* Disallow deletion of big pages by means of moving a page to its title and using the
"delete and move" option.
* (bug 13466) White space differences not shown in diffs
+* (bug 1953) Search form now honors namespace selections more reliably
+
=== API changes in 1.13 ===
function SpecialSearch( &$request, &$user ) {
list( $this->limit, $this->offset ) = $request->getLimitOffset( 20, 'searchlimit' );
- if( $request->getCheck( 'searchx' ) ) {
- $this->namespaces = $this->powerSearch( $request );
- } else {
+ $this->namespaces = $this->powerSearch( $request );
+ if( empty( $this->namespaces ) ) {
$this->namespaces = $this->userNamespaces( $user );
}
$opt['ns' . $n] = 1;
}
$opt['redirs'] = $this->searchRedirects ? 1 : 0;
- $opt['searchx'] = 1;
return $opt;
}
$redirect = Xml::check( 'redirs', $this->searchRedirects, array( 'value' => '1' ) );
$searchField = Xml::input( 'search', 50, $term, array( 'type' => 'text', 'id' => 'powerSearchText' ) );
- $searchButton = Xml::submitButton( wfMsg( 'powersearch' ), array( 'name' => 'searchx' ) ) . "\n";
+ $searchButton = Xml::submitButton( wfMsg( 'powersearch' ), array( 'name' => 'fulltext' ) ) . "\n";
$out = Xml::openElement( 'form', array( 'id' => 'powersearch', 'method' => 'get', 'action' => $wgScript ) ) .
Xml::openElement( 'fieldset' ) .
));
$out .= Xml::hidden( 'title', 'Special:Search' );
$out .= Xml::input( 'search', 50, $term ) . ' ';
+ foreach( SearchEngine::searchableNamespaces() as $ns => $name ) {
+ if( in_array( $ns, $this->namespaces ) ) {
+ $out .= Xml::hidden( "ns{$ns}", '1' );
+ }
+ }
$out .= Xml::submitButton( wfMsg( 'searchbutton' ), array( 'name' => 'fulltext' ) );
$out .= Xml::closeElement( 'form' );