jenkins-bot has submitted this change and it was merged.

Change subject: Replace instances of wfEmptyMsg() with wfMessage()->isDisabled()
......................................................................


Replace instances of wfEmptyMsg() with wfMessage()->isDisabled()

Bug: T70750
Change-Id: Ifdbc114439c1b0608aed9fb7f88a3cd8ce3eeb5f
---
M business/AccountConfirmSubmission.php
1 file changed, 7 insertions(+), 6 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/business/AccountConfirmSubmission.php 
b/business/AccountConfirmSubmission.php
index 32f6731..2b711a1 100644
--- a/business/AccountConfirmSubmission.php
+++ b/business/AccountConfirmSubmission.php
@@ -256,13 +256,14 @@
                # Prepare a temporary password email...
                if ( $this->reason != '' ) {
                        $msg = "confirmaccount-email-body2-pos{$this->type}";
+                       $msgObj = $context->msg( $msg, $user->getName(), $p, 
$this->reason );
                        # If the user is in a group and there is a welcome for 
that group, use it
-                       if ( $group && !wfEmptyMsg( $msg ) ) {
-                               $ebody = $context->msg( $msg, $user->getName(), 
$p, $this->reason )->inContentLanguage()->text();
+                       if ( $group && !$msgObj->isDisabled() ) {
+                               $ebody = $msgObj->inContentLanguage()->text();
                        # Use standard if none found...
                        } else {
                                $ebody = $context->msg( 
'confirmaccount-email-body2',
-                                       $user->getName(), $p, $this->reason 
)->inContentLanguage()->text();
+                                       $user->getName(), $p, $this->reason 
)->inContentLanguage()->text();
                        }
                } else {
                        $msg = "confirmaccount-email-body-pos{$this->type}";
@@ -430,10 +431,10 @@
                global $wgAutoWelcomeNewUsers;
 
                if ( $wgAutoWelcomeNewUsers ) {
-                       $msg = "confirmaccount-welc-pos{$this->type}";
-                       $welcome = wfEmptyMsg( $msg )
+                       $msgObj = wfMessage( 
"confirmaccount-welc-pos{$this->type}" );
+                       $welcome = $msgObj->isDisabled()
                                ? wfMessage( 'confirmaccount-welc' )->text()
-                               : wfMessage( $msg )->text(); // custom message
+                               : $msgObj->text(); // custom message
                        # Add user welcome message!
                        $article = new WikiPage( $user->getTalkPage() );
                        $article->doEdit(

-- 
To view, visit https://gerrit.wikimedia.org/r/182579
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifdbc114439c1b0608aed9fb7f88a3cd8ce3eeb5f
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/ConfirmAccount
Gerrit-Branch: master
Gerrit-Owner: McIntireEvan <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: McIntireEvan <[email protected]>
Gerrit-Reviewer: Nemo bis <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to