mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Linter
synced 2024-11-27 17:20:12 +00:00
Fix the Linter category subpage search when namespace field is blank
* When the user does not specify any namespace in a category subpage search it should return all namespaces. This duplicates the behavior for when the category is first selected from the main Linter page. Bug: T361081 Change-Id: Iccb195bf1b679e6e0165e4b1dde6e8d84db4d5b0
This commit is contained in:
parent
186c54d1dc
commit
85ea579c97
|
@ -210,10 +210,12 @@ class SpecialLintErrors extends SpecialPage {
|
|||
);
|
||||
if ( $request->getCheck( 'wpNamespaceRestrictions' ) ) {
|
||||
$namespaceRequestValues = $request->getRawVal( 'wpNamespaceRestrictions' );
|
||||
if ( strlen( $namespaceRequestValues ) > 0 ) {
|
||||
$namespaceIDs = array_map( 'intval', explode( "\n", $namespaceRequestValues ) );
|
||||
// Security measure: only allow active namespace IDs to reach the query
|
||||
$namespaces = array_values( array_intersect( $activeNamespaces, $namespaceIDs ) );
|
||||
}
|
||||
}
|
||||
return $namespaces;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue