Fix login button label to accept RawMessage.
authorCicalese <cindom@gmail.com>
Tue, 17 Oct 2017 17:58:28 +0000 (17:58 +0000)
committerCicalese <cindom@gmail.com>
Tue, 17 Oct 2017 18:05:20 +0000 (18:05 +0000)
The label is already a Message at this point. For Messages that
are not RawMessages, the call to wfMessage() does not do any harm.
However, for RawMessages, it causes the label to appear in <>.
Removing the call to wfMessage() does not harm regular Messages
and fixes the problem for RawMessages.

Change-Id: I943628e2a1fbf6fff579dd52c1058ca2ef125d34

includes/specialpage/AuthManagerSpecialPage.php

index 0cdc55f..95729f3 100644 (file)
@@ -679,7 +679,7 @@ abstract class AuthManagerSpecialPage extends SpecialPage {
                ];
 
                if ( $type === 'submit' && isset( $singleFieldInfo['label'] ) ) {
-                       $descriptor['default'] = wfMessage( $singleFieldInfo['label'] )->plain();
+                       $descriptor['default'] = $singleFieldInfo['label']->plain();
                } elseif ( $type !== 'submit' ) {
                        $descriptor += array_filter( [
                                // help-message is omitted as it is usually not really useful for a web interface