Merge "Skin: Make skins aware of their registered skin name"
[lhc/web/wiklou.git] / includes / htmlform / fields / HTMLTitleTextField.php
index 5d5d765..3eb3f5d 100644 (file)
@@ -51,29 +51,28 @@ class HTMLTitleTextField extends HTMLTextField {
                        if ( $params ) {
                                $msg->params( $params );
                        }
-                       return $msg->parse();
+                       return $msg;
                }
 
                $text = $title->getPrefixedText();
                if ( $this->mParams['namespace'] !== false &&
                        !$title->inNamespace( $this->mParams['namespace'] )
                ) {
-                       return $this->msg( 'htmlform-title-badnamespace', $this->mParams['namespace'], $text )->parse();
+                       return $this->msg( 'htmlform-title-badnamespace', $this->mParams['namespace'], $text );
                }
 
                if ( $this->mParams['creatable'] && !$title->canExist() ) {
-                       return $this->msg( 'htmlform-title-not-creatable', $text )->escaped();
+                       return $this->msg( 'htmlform-title-not-creatable', $text );
                }
 
                if ( $this->mParams['exists'] && !$title->exists() ) {
-                       return $this->msg( 'htmlform-title-not-exists', $text )->parse();
+                       return $this->msg( 'htmlform-title-not-exists', $text );
                }
 
                return parent::validate( $value, $alldata );
        }
 
        protected function getInputWidget( $params ) {
-               $this->mParent->getOutput()->addModules( 'mediawiki.widgets' );
                if ( $this->mParams['namespace'] !== false ) {
                        $params['namespace'] = $this->mParams['namespace'];
                }
@@ -85,6 +84,11 @@ class HTMLTitleTextField extends HTMLTextField {
                return true;
        }
 
+       protected function getOOUIModules() {
+               // FIXME: TitleInputWidget should be in its own module
+               return [ 'mediawiki.widgets' ];
+       }
+
        public function getInputHtml( $value ) {
                // add mw-searchInput class to enable search suggestions for non-OOUI, too
                $this->mClass .= 'mw-searchInput';