Merge "Stay on mode=categories after the first submit with all namespaces"

This commit is contained in:
jenkins-bot 2024-10-10 16:45:11 +00:00 committed by Gerrit Code Review
commit bcdc686cac

View file

@ -111,9 +111,9 @@ class CategoryTreePage extends SpecialPage {
* Input form for entering a category
*/
private function executeInputForm() {
$namespaces = $this->getRequest()->getRawVal( 'namespaces' );
$namespaces = $this->getRequest()->getRawVal( 'namespaces' ) ?? '';
// mode may be overriden by namespaces option
$mode = ( $namespaces === null ? $this->getOption( 'mode' ) : CategoryTreeMode::ALL );
$mode = ( $namespaces === '' ? $this->getOption( 'mode' ) : CategoryTreeMode::ALL );
if ( $mode === CategoryTreeMode::CATEGORIES ) {
$modeDefault = 'categories';
} elseif ( $mode === CategoryTreeMode::PAGES ) {