diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-12-17 09:15:42 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-12-17 09:44:51 +0100 |
commit | a1789ddde42033f1b05cc4929491214ee6e79383 (patch) | |
tree | 63615735c4ddffaaabf2428946bb26f90899f7bf /includes/specials/SpecialRandomInCategory.php | |
parent | 9e06a62f265e3a2aaabecc598d4bc617e06fa32d (diff) |
Update to MediaWiki 1.26.0
Diffstat (limited to 'includes/specials/SpecialRandomInCategory.php')
-rw-r--r-- | includes/specials/SpecialRandomInCategory.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/includes/specials/SpecialRandomInCategory.php b/includes/specials/SpecialRandomInCategory.php index b5c9e19a..7cf6b0a1 100644 --- a/includes/specials/SpecialRandomInCategory.php +++ b/includes/specials/SpecialRandomInCategory.php @@ -70,15 +70,15 @@ class SpecialRandomInCategory extends FormSpecialPage { protected function getFormFields() { $this->addHelpLink( 'Help:RandomInCategory' ); - $form = array( + return array( 'category' => array( - 'type' => 'text', + 'type' => 'title', + 'namespace' => NS_CATEGORY, + 'relative' => true, 'label-message' => 'randomincategory-category', 'required' => true, ) ); - - return $form; } public function requiresWrite() { @@ -89,6 +89,14 @@ class SpecialRandomInCategory extends FormSpecialPage { return false; } + protected function getDisplayFormat() { + return 'ooui'; + } + + protected function alterForm( HTMLForm $form ) { + $form->setSubmitTextMsg( 'randomincategory-submit' ); + } + protected function setParameter( $par ) { // if subpage present, fake form submission $this->onSubmit( array( 'category' => $par ) ); |