mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Linter
synced 2024-09-23 10:21:52 +00:00
Merge "Fix the Linter category subpage search when namespace field is blank"
This commit is contained in:
commit
08fbe80da9
|
@ -210,9 +210,11 @@ class SpecialLintErrors extends SpecialPage {
|
|||
);
|
||||
if ( $request->getCheck( 'wpNamespaceRestrictions' ) ) {
|
||||
$namespaceRequestValues = $request->getRawVal( 'wpNamespaceRestrictions' );
|
||||
$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 ) );
|
||||
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