Merge "Don't check namespace in SpecialWantedtemplates"
[lhc/web/wiklou.git] / includes / specials / SpecialRandomInCategory.php
index e21eaeb..7cf6b0a 100644 (file)
@@ -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,10 @@ class SpecialRandomInCategory extends FormSpecialPage {
                return false;
        }
 
+       protected function getDisplayFormat() {
+               return 'ooui';
+       }
+
        protected function alterForm( HTMLForm $form ) {
                $form->setSubmitTextMsg( 'randomincategory-submit' );
        }