mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-11-27 17:51:00 +00:00
Stay on mode=categories after the first submit with all namespaces
After the first submit the URL contains &namespaces= with empty value.
This must be handled like a missing URL parameter.
Restore the default value '' removed in aec8d755
.
Bug: T334289
Change-Id: I22d0eb334365472d411252f805d0d78a3cc265ab
This commit is contained in:
parent
cf210d9548
commit
7f52cbc5b7
|
@ -122,9 +122,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 ) {
|
||||
|
|
Loading…
Reference in a new issue