From 7261bf0ae8b80933199dc112a9b6d250f93a9b4c Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Thu, 15 Sep 2016 14:59:11 -0700 Subject: [PATCH] HTMLFancyCaptchaField: Avoid wfMessage() Change-Id: I5d9b1376c8d951dbc3744ee20a09301c55958fdb --- FancyCaptcha/HTMLFancyCaptchaField.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/FancyCaptcha/HTMLFancyCaptchaField.php b/FancyCaptcha/HTMLFancyCaptchaField.php index a80e1bb85..fe8e7da1f 100644 --- a/FancyCaptcha/HTMLFancyCaptchaField.php +++ b/FancyCaptcha/HTMLFancyCaptchaField.php @@ -40,7 +40,7 @@ class HTMLFancyCaptchaField extends HTMLFormField { $captchaReload = Html::element( 'small', [ 'class' => 'confirmedit-captcha-reload fancycaptcha-reload' ], - wfMessage( 'fancycaptcha-reload-text' )->text() + $this->mParent->msg( 'fancycaptcha-reload-text' )->text() ); } else { $captchaReload = ''; @@ -56,7 +56,7 @@ class HTMLFancyCaptchaField extends HTMLFormField { 'autocomplete' => 'off', 'autocorrect' => 'off', 'autocapitalize' => 'off', - 'placeholder' => wfMessage( 'fancycaptcha-imgcaptcha-ph' ) + 'placeholder' => $this->mParent->msg( 'fancycaptcha-imgcaptcha-ph' )->text() ]; $attribs += $this->getAttributes( [ 'tabindex', 'required', 'autofocus' ] ); @@ -74,7 +74,7 @@ class HTMLFancyCaptchaField extends HTMLFormField { // use raw element, the message will contain a link $html .= Html::rawElement( 'small', [ 'class' => 'mw-createacct-captcha-assisted' - ], wfMessage( 'createacct-imgcaptcha-help' )->parse() ); + ], $this->mParent->msg( 'createacct-imgcaptcha-help' )->parse() ); } $html .= Html::closeElement( 'div' ); @@ -85,7 +85,8 @@ class HTMLFancyCaptchaField extends HTMLFormField { public function getLabel() { // slight abuse of what getLabel() should mean; $mLabel is used for the pre-label text // as the actual label is always the same - return wfMessage( 'captcha-label' )->text() . ' ' . wfMessage( 'fancycaptcha-captcha' )->text(); + return $this->mParent->msg( 'captcha-label' )->text() . ' ' + . $this->mParent->msg( 'fancycaptcha-captcha' )->text(); } public function getLabelHtml( $cellAttributes = [] ) {