Wikinaut has uploaded a new change for review. https://gerrit.wikimedia.org/r/50604
Change subject: (bug 45268) cumulative fix replacing deprecated wfMsg calls ...................................................................... (bug 45268) cumulative fix replacing deprecated wfMsg calls final and cumulative fix for replacing deprecated wfMsg * calls with wfMessage. It is an follow up to and includes the changes which were already merged in https://gerrit.wikimedia.org/r/#/c/50478/ . Change-Id: I76e744184228a5f20c26fb0575f0ff278fc0c437 --- M .gitignore M OpenID.hooks.php M OpenIDProvider.body.php M SpecialOpenIDConvert.body.php M SpecialOpenIDDashboard.body.php M SpecialOpenIDLogin.body.php M SpecialOpenIDServer.body.php M SpecialOpenIDXRDS.body.php 8 files changed, 93 insertions(+), 85 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenID refs/changes/04/50604/1 diff --git a/.gitignore b/.gitignore index 92d560d..3f2efdc 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ *.kate-swp .*.swp Auth/ +php-openid/ diff --git a/OpenID.hooks.php b/OpenID.hooks.php index eb31e9e..764dadc 100644 --- a/OpenID.hooks.php +++ b/OpenID.hooks.php @@ -113,7 +113,7 @@ $returnto = $title->isSpecial( 'Userlogout' ) ? '' : ( 'returnto=' . $title->getPrefixedURL() ); $personal_urls['openidlogin'] = array( - 'text' => wfMsg( 'openidlogin' ), + 'text' => wfMessage( 'openidlogin' )->text(), 'href' => $sk->makeSpecialUrl( 'OpenIDLogin', $returnto ), 'active' => $title->isSpecial( 'OpenIDLogin' ) ); @@ -152,13 +152,12 @@ foreach ( $openid_urls_registration as $url_reg ) { if ( !empty( $url_reg->uoi_user_registration ) ) { - $registrationTime = wfMsgExt( + $registrationTime = wfMessage( 'openid-urls-registration-date-time', - 'parsemag', $wgLang->timeanddate( $url_reg->uoi_user_registration, true ), $wgLang->date( $url_reg->uoi_user_registration, true ), $wgLang->time( $url_reg->uoi_user_registration, true ) - ); + )->text(); } else { $registrationTime = ''; } @@ -174,7 +173,7 @@ ) . Xml::tags( 'td', array(), - $sk->link( $delTitle, wfMsgHtml( 'openid-urls-delete' ), + $sk->link( $delTitle, wfMessage( 'openid-urls-delete' )->text(), array(), array( 'url' => $url_reg->uoi_openid ) ) @@ -185,17 +184,20 @@ Xml::tags( 'tr', array(), Xml::element( 'th', array(), - wfMsg( 'openid-urls-url' ) ) . + wfMessage( 'openid-urls-url' )->text() ) . Xml::element( 'th', array(), - wfMsg( 'openid-urls-registration' ) ) . + wfMessage( 'openid-urls-registration' )->text() ) . Xml::element( 'th', array(), - wfMsg( 'openid-urls-action' ) ) + wfMessage( 'openid-urls-action' )->text() ) ) . "\n" . $rows ); - $info .= $sk->link( SpecialPage::getTitleFor( 'OpenIDConvert' ), wfMsgHtml( 'openid-add-url' ) ); + $info .= $sk->link( + SpecialPage::getTitleFor( 'OpenIDConvert' ), + wfMessage( 'openid-add-url' )->text() + ); return $info; } @@ -213,13 +215,13 @@ } $update = array(); - $update[wfMsg( 'openidnickname' )] = 'nickname'; - $update[wfMsg( 'openidemail' )] = 'email'; + $update[ wfMessage( 'openidnickname' )->text() ] = 'nickname'; + $update[ wfMessage( 'openidemail' )->text() ] = 'email'; if ( $wgAllowRealName ) { - $update[wfMsg( 'openidfullname' )] = 'fullname'; + $update[ wfMessage( 'openidfullname' )->text() ] = 'fullname'; } - $update[wfMsg( 'openidlanguage' )] = 'language'; - $update[wfMsg( 'openidtimezone' )] = 'timezone'; + $update[ wfMessage( 'openidlanguage' )->text() ] = 'language'; + $update[ wfMessage( 'openidtimezone' )->text() ] = 'timezone'; $preferences['openid-update-on-login'] = array( @@ -241,9 +243,12 @@ if ( $wgAuth->allowPasswordChange() ) { - $resetlink = $wgUser->getSkin()->link( SpecialPage::getTitleFor( 'PasswordReset' ), - wfMsgHtml( 'passwordreset' ), array(), - array( 'returnto' => SpecialPage::getTitleFor( 'Preferences' ) ) ); + $resetlink = $wgUser->getSkin()->link( + SpecialPage::getTitleFor( 'PasswordReset' ), + wfMessage( 'passwordreset' )->text(), + array(), + array( 'returnto' => SpecialPage::getTitleFor( 'Preferences' ) ) + ); if ( empty( $wgUser->mPassword ) && empty( $wgUser->mNewpassword ) ) { $preferences['password'] = array( @@ -268,11 +273,10 @@ unset( $preferences['rememberpassword'] ); $preferences['rememberpassword'] = array( 'type' => 'toggle', - 'label' => wfMsgExt( + 'label' => wfMessage( 'tog-rememberpassword', - array( 'parsemag' ), $wgLang->formatNum( ceil( $wgCookieExpiration / ( 3600 * 24 ) ) ) - ), + )->text(), 'section' => 'personal/info', ); } @@ -293,7 +297,7 @@ $dbw = wfGetDB( DB_MASTER ); $dbw->delete( 'user_openid', array( 'uoi_user' => $userID ) ); - $wgOut->addHTML( "OpenID " . wfMsgExt( 'usermerge-userdeleted', array( 'escape' ), $username, $userID ) ); + $wgOut->addHTML( "OpenID " . wfMessage( 'usermerge-userdeleted', $username, $userID )->escaped() ); wfDebug( "OpenID: deleted OpenID user $username ($userID)\n" ); @@ -318,13 +322,13 @@ $dbw = wfGetDB( DB_MASTER ); $dbw->update( 'user_openid', array( 'uoi_user' => $toUserID ), array( 'uoi_user' => $fromUserID ) ); - $wgOut->addHTML( "OpenID " . wfMsgExt( 'usermerge-updating', array( 'escape' ), 'user_openid', $fromUsername, $toUsername ) . "<br />\n" ); + $wgOut->addHTML( "OpenID " . wfMessage( 'usermerge-updating', 'user_openid', $fromUsername, $toUsername )->escaped() . "<br />\n" ); wfDebug( "OpenID: transferred OpenID(s) of $fromUsername ($fromUserID) => $toUsername ($toUserID)\n" ); } else { - $wgOut->addHTML( wfMsgHtml( 'openid-openids-were-not-merged' ) . "<br />\n" ); + $wgOut->addHTML( wfMessage( 'openid-openids-were-not-merged' )->text() . "<br />\n" ); wfDebug( "OpenID: OpenID(s) were not merged for merged users $fromUsername ($fromUserID) => $toUsername ($toUserID)\n" ); } diff --git a/OpenIDProvider.body.php b/OpenIDProvider.body.php index 05f6054..5f33f8e 100644 --- a/OpenIDProvider.body.php +++ b/OpenIDProvider.body.php @@ -69,7 +69,7 @@ global $wgRequest; $url = htmlspecialchars( $wgRequest->getCookie( 'OpenID', null, '' ) ); $html .= '<input type="text" name="openid_url" id="openid_url" size="45" value="' . $url . '" />'; - $html .= Xml::submitButton( wfMsg( 'userlogin' ) ); + $html .= Xml::submitButton( wfMessage( 'userlogin' )->text() ); } else { $html .= '<input type="hidden" id="openid_provider_url_' . $this->id . '" value="' . $this->url . '" />'; if ( strpos( $this->url, '{' ) === false ) { @@ -77,7 +77,7 @@ } else { $html .= '<input type="text" id="openid_provider_param_' . $this->id . '" size="25" value="" />'; } - $html .= Xml::submitButton( wfMsg( 'userlogin' ) ); + $html .= Xml::submitButton( wfMessage( 'userlogin' )->text() ); } $html .= '</div>'; @@ -90,10 +90,10 @@ */ public static function getLargeProviders() { return array( - new self( 'openid', 'OpenID', wfMsg( 'openid-provider-label-openid' ), '{URL}' ), - new self( 'google', 'Google', wfMsg( 'openid-provider-label-google' ), 'https://www.google.com/accounts/o8/id' ), - new self( 'yahoo', 'Yahoo', wfMsg( 'openid-provider-label-yahoo' ), 'http://yahoo.com/' ), - new self( 'aol', 'AOL', wfMsg( 'openid-provider-label-aol' ), 'http://openid.aol.com/{username}' ), + new self( 'openid', 'OpenID', wfMessage( 'openid-provider-label-openid' )->text(), '{URL}' ), + new self( 'google', 'Google', wfMessage( 'openid-provider-label-google' )->text(), 'https://www.google.com/accounts/o8/id' ), + new self( 'yahoo', 'Yahoo', wfMessage( 'openid-provider-label-yahoo' )->text(), 'http://yahoo.com/' ), + new self( 'aol', 'AOL', wfMessage( 'openid-provider-label-aol' )->text(), 'http://openid.aol.com/{username}' ), ); } @@ -103,21 +103,21 @@ */ public static function getSmallProviders() { return array( - new self( 'myopenid', 'MyOpenID', wfMsg( 'openid-provider-label-other-username', 'MyOpenID' ), + new self( 'myopenid', 'MyOpenID', wfMessage( 'openid-provider-label-other-username', 'MyOpenID' )->text(), 'http://{username}.myopenid.com/' ), - new self( 'livejournal', 'LiveJournal', wfMsg( 'openid-provider-label-other-username', 'LiveJournal' ), + new self( 'livejournal', 'LiveJournal', wfMessage( 'openid-provider-label-other-username', 'LiveJournal' )->text(), 'http://{username}.livejournal.com/' ), - new self( 'vox', 'VOX', wfMsg( 'openid-provider-label-other-username', 'VOX' ), + new self( 'vox', 'VOX', wfMessage( 'openid-provider-label-other-username', 'VOX' )->text(), 'http://{username}.vox.com/' ), - new self( 'blogger', 'Blogger', wfMsg( 'openid-provider-label-other-username', 'Blogger' ), + new self( 'blogger', 'Blogger', wfMessage( 'openid-provider-label-other-username', 'Blogger' )->text(), 'http://{username}.blogspot.com/' ), - new self( 'flickr', 'Flickr', wfMsg( 'openid-provider-label-other-username', 'Flickr' ), + new self( 'flickr', 'Flickr', wfMessage( 'openid-provider-label-other-username', 'Flickr' )->text(), 'http://flickr.com/photos/{username}/' ), - new self( 'verisign', 'Verisign', wfMsg( 'openid-provider-label-other-username', 'Verisign' ), + new self( 'verisign', 'Verisign', wfMessage( 'openid-provider-label-other-username', 'Verisign' )->text(), 'http://{username}.pip.verisignlabs.com/' ), - new self( 'vidoop', 'Vidoop', wfMsg( 'openid-provider-label-other-username', 'Vidoop' ), + new self( 'vidoop', 'Vidoop', wfMessage( 'openid-provider-label-other-username', 'Vidoop' )->text(), 'http://{username}.myvidoop.com/' ), - new self( 'claimid', 'ClaimID', wfMsg( 'openid-provider-label-other-username', 'ClaimID' ), + new self( 'claimid', 'ClaimID', wfMessage( 'openid-provider-label-other-username', 'ClaimID' )->text(), 'http://claimid.com/{username}' ) ); } diff --git a/SpecialOpenIDConvert.body.php b/SpecialOpenIDConvert.body.php index 8ead085..48f2f0e 100644 --- a/SpecialOpenIDConvert.body.php +++ b/SpecialOpenIDConvert.body.php @@ -168,8 +168,8 @@ 'onsubmit' => 'openid.update()' ) ) . - Xml::fieldset( wfMsg( 'openidconvertoraddmoreids' ) ) . - Xml::openElement( 'p' ) . wfMsg( 'openidconvertinstructions' ) . Xml::closeElement( 'p' ) . + Xml::fieldset( wfMessage( 'openidconvertoraddmoreids' )->text() ) . + Xml::openElement( 'p' ) . wfMessage( 'openidconvertinstructions' )->text() . Xml::closeElement( 'p' ) . $largeButtonsHTML . '<div id="openid_input_area">' . $formsHTML . @@ -190,7 +190,7 @@ return; } - $wgOut->setPageTitle( wfMsg( 'openiddelete' ) ); + $wgOut->setPageTitle( wfMessage( 'openiddelete' )->text() ); # Check if the user is removing it's last OpenID url $urls = self::getUserOpenIDInformation( $wgUser ); @@ -221,7 +221,7 @@ 'method' => 'post' ) ) . - Xml::submitButton( wfMsg( 'openiddelete-button' ) ) . "\n" . + Xml::submitButton( wfMessage( 'openiddelete-button' )->text() ) . "\n" . Html::Hidden( 'url', $openid ) . "\n" . Html::Hidden( 'wpEditToken', $wgUser->editToken( $openid ) ) . "\n" . Xml::closeElement( 'form' ) @@ -298,7 +298,7 @@ $this->loginSetCookie( $openid_url ); - $wgOut->setPageTitle( wfMsg( 'openidconvertsuccess' ) ); + $wgOut->setPageTitle( wfMessage( 'openidconvertsuccess' )->text() ); $wgOut->setRobotPolicy( 'noindex,nofollow' ); $wgOut->setArticleRelated( false ); $wgOut->addWikiMsg( 'openidconvertsuccesstext', $openid_url ); diff --git a/SpecialOpenIDDashboard.body.php b/SpecialOpenIDDashboard.body.php index ea5feeb..e2bd246 100644 --- a/SpecialOpenIDDashboard.body.php +++ b/SpecialOpenIDDashboard.body.php @@ -26,8 +26,11 @@ function getDescription() { global $wgUser; - return wfMsg( $wgUser->isAllowed( 'openid-dashboard-admin' ) ? - 'openid-dashboard-title-admin' : 'openid-dashboard-title' ) ; + if ( $wgUser->isAllowed( 'openid-dashboard-admin' ) ) { + return wfMessage( 'openid-dashboard-title-admin' )->text(); + } else { + return wfMessage( 'openid-dashboard-title' )->text() ; + } } function show( $string, $value ) { @@ -83,8 +86,8 @@ ); # Here we show some basic version infos. Retrieval of SVN revision number of OpenID appears to be too difficult - $out = $this->show( 'OpenID ' . wfMsg( 'version-software-version' ), MEDIAWIKI_OPENID_VERSION ); - $out .= $this->show( 'MediaWiki ' . wfMsg( 'version-software-version' ), SpecialVersion::getVersion() ); + $out = $this->show( 'OpenID ' . wfMessage( 'version-software-version' )->text(), MEDIAWIKI_OPENID_VERSION ); + $out .= $this->show( 'MediaWiki ' . wfMessage( 'version-software-version' )->text(), SpecialVersion::getVersion() ); $out .= $this->show( '$wgOpenIDOnly', $wgOpenIDOnly ); $out .= $this->show( '$wgOpenIDClientOnly', $wgOpenIDClientOnly ); $out .= $this->show( '$wgOpenIDAllowServingOpenIDUserAccounts', $wgOpenIDAllowServingOpenIDUserAccounts ); @@ -96,10 +99,10 @@ $out .= $this->show( '$wgOpenIDProposeUsernameFromSREG', $wgOpenIDProposeUsernameFromSREG ); $out .= $this->show( '$wgOpenIDShowUrlOnUserPage', $wgOpenIDShowUrlOnUserPage ); $out .= $this->show( '$wgOpenIDShowProviderIcons', $wgOpenIDShowProviderIcons ); - $out .= $this->show( wfMsgExt( 'statistics-users', array( 'parseinline' ) ), $totalUsers ); - $out .= $this->show( wfMsg( 'openid-dashboard-number-openid-users' ), $OpenIDdistinctUsers ); - $out .= $this->show( wfMsg( 'openid-dashboard-number-openids-in-database' ), $OpenIDUsers ); - $out .= $this->show( wfMsg( 'openid-dashboard-number-users-without-openid' ), $totalUsers - $OpenIDdistinctUsers ); + $out .= $this->show( wfMessage( 'statistics-users' )->parse(), $totalUsers ); + $out .= $this->show( wfMessage( 'openid-dashboard-number-openid-users' )->text(), $OpenIDdistinctUsers ); + $out .= $this->show( wfMessage( 'openid-dashboard-number-openids-in-database' )->text(), $OpenIDUsers ); + $out .= $this->show( wfMessage( 'openid-dashboard-number-users-without-openid' )->text(), $totalUsers - $OpenIDdistinctUsers ); $wgOut->addHTML( $out . Html::closeElement( 'table' ) . "\n" ); diff --git a/SpecialOpenIDLogin.body.php b/SpecialOpenIDLogin.body.php index 943de97..951c6cc 100644 --- a/SpecialOpenIDLogin.body.php +++ b/SpecialOpenIDLogin.body.php @@ -84,7 +84,7 @@ function alreadyLoggedIn() { global $wgUser, $wgOut; - $wgOut->setPageTitle( wfMsg( 'openidalreadyloggedin' ) ); + $wgOut->setPageTitle( wfMessage( 'openidalreadyloggedin' )->text() ); $wgOut->setRobotPolicy( 'noindex,nofollow' ); $wgOut->setArticleRelated( false ); $wgOut->addWikiMsg( 'openidalreadyloggedintext', $wgUser->getName() ); @@ -141,7 +141,7 @@ $wgOut->addHTML( Xml::openElement( 'form', array( 'id' => 'openid_form', 'action' => $this->getTitle()->getLocalUrl(), 'method' => 'post', 'onsubmit' => 'openid.update()' ) ) . - Xml::fieldset( wfMsg( 'openid-login-or-create-account' ) ) . + Xml::fieldset( wfMessage( 'openid-login-or-create-account' )->text() ) . $largeButtonsHTML . '<div id="openid_input_area">' . $formsHTML . @@ -177,7 +177,7 @@ $wgOut->addHTML( Xml::openElement( 'form', array( 'action' => $this->getTitle( 'ChooseName' )->getLocalUrl(), 'method' => 'POST' ) ) . "\n" . - Xml::fieldset( wfMsg( 'openidchooselegend' ), false, array( 'id' => 'mw-openid-choosename' ) ) . "\n" . + Xml::fieldset( wfMessage( 'openidchooselegend' )->text(), false, array( 'id' => 'mw-openid-choosename' ) ) . "\n" . Xml::openElement( 'table' ) ); $def = false; @@ -207,7 +207,7 @@ $oidAttributes[] = Xml::tags( 'li', array(), Xml::check( $checkName, false, array( 'id' => $checkName ) ) . Xml::tags( 'label', array( 'for' => $checkName ), - wfMsgHtml( "openid$oidAttr" ) . wfMsgExt( 'colon-separator', array( 'escapenoentities' ) ) . + wfMessage( "openid$oidAttr" )->text() . wfMessage( 'colon-separator' )->escaped() . Xml::tags( 'i', array(), $sreg[$oidAttr] ) ) ); @@ -217,7 +217,7 @@ $oidAttributesUpdate = ''; if ( count( $oidAttributes ) > 0 ) { $oidAttributesUpdate = "<br />\n" . - wfMsgHtml( 'openidupdateuserinfo' ) . "\n" . + wfMessage( 'openidupdateuserinfo' )->text() . "\n" . Xml::tags( 'ul', array(), implode( "\n", $oidAttributes ) ); } @@ -227,10 +227,10 @@ Xml::radio( 'wpNameChoice', 'existing', !$def, array( 'id' => 'wpNameChoiceExisting' ) ) ) . "\n" . Xml::tags( 'td', array( 'class' => 'mw-input' ), - Xml::label( wfMsg( 'openidchooseexisting' ), 'wpNameChoiceExisting' ) . "<br />\n" . - wfMsgHtml( 'openidchooseusername' ) . "\n" . + Xml::label( wfMessage( 'openidchooseexisting' )->text(), 'wpNameChoiceExisting' ) . "<br />\n" . + wfMessage( 'openidchooseusername' )->text() . "\n" . Xml::input( 'wpExistingName', 16, $name, array( 'id' => 'wpExistingName' ) ) . "\n" . - wfMsgHtml( 'openidchoosepassword' ) . "\n" . + wfMessage( 'openidchoosepassword' )->text() . "\n" . Xml::password( 'wpExistingPassword' ) . "\n" . $oidAttributesUpdate . "\n" ) . "\n" . @@ -252,7 +252,7 @@ Xml::radio( 'wpNameChoice', 'nick', !$def, array( 'id' => 'wpNameChoiceNick' ) ) ) . Xml::tags( 'td', array( 'class' => 'mw-input' ), - Xml::label( wfMsg( 'openidchoosenick', $sreg['nickname'] ), 'wpNameChoiceNick' ) + Xml::label( wfMessage( 'openidchoosenick', $sreg['nickname'] )->text(), 'wpNameChoiceNick' ) ) . Xml::closeElement( 'tr' ) . "\n" ); @@ -275,7 +275,7 @@ Xml::radio( 'wpNameChoice', 'full', !$def, array( 'id' => 'wpNameChoiceFull' ) ) ) . Xml::tags( 'td', array( 'class' => 'mw-input' ), - Xml::label( wfMsg( 'openidchoosefull', $fullname ), 'wpNameChoiceFull' ) + Xml::label( wfMessage( 'openidchoosefull', $fullname )->text(), 'wpNameChoiceFull' ) ) . Xml::closeElement( 'tr' ) . "\n" ); @@ -290,7 +290,7 @@ Xml::radio( 'wpNameChoice', 'url', !$def, array( 'id' => 'wpNameChoiceUrl' ) ) ) . Xml::tags( 'td', array( 'class' => 'mw-input' ), - Xml::label( wfMsg( 'openidchooseurl', $idname ), 'wpNameChoiceUrl' ) + Xml::label( wfMessage( 'openidchooseurl', $idname )->text(), 'wpNameChoiceUrl' ) ) . Xml::closeElement( 'tr' ) . "\n" ); @@ -305,7 +305,7 @@ Xml::radio( 'wpNameChoice', 'auto', !$def, array( 'id' => 'wpNameChoiceAuto' ) ) ) . Xml::tags( 'td', array( 'class' => 'mw-input' ), - Xml::label( wfMsg( 'openidchooseauto', $this->automaticName( $sreg ) ), 'wpNameChoiceAuto' ) + Xml::label( wfMessage( 'openidchooseauto', $this->automaticName( $sreg ) )->text(), 'wpNameChoiceAuto' ) ) . Xml::closeElement( 'tr' ) . "\n" ); @@ -319,7 +319,7 @@ Xml::radio( 'wpNameChoice', 'manual', !$def, array( 'id' => 'wpNameChoiceManual' ) ) ) . Xml::tags( 'td', array( 'class' => 'mw-input' ), - Xml::label( wfMsg( 'openidchoosemanual' ), 'wpNameChoiceManual' ) . ' ' . + Xml::label( wfMessage( 'openidchoosemanual' )->text(), 'wpNameChoiceManual' ) . ' ' . Xml::input( 'wpNameValue', 16, false, array( 'id' => 'wpNameValue' ) ) ) . Xml::closeElement( 'tr' ) . "\n" @@ -334,8 +334,8 @@ Xml::openElement( 'tr' ) . "\n" . Xml::element( 'td', array(), '' ) . "\n" . Xml::tags( 'td', array( 'class' => 'mw-submit' ), - Xml::submitButton( wfMsg( 'userlogin' ), array( 'name' => 'wpOK' ) ) . - Xml::submitButton( wfMsg( 'cancel' ), array( 'name' => 'wpCancel' ) ) + Xml::submitButton( wfMessage( 'userlogin' )->text(), array( 'name' => 'wpOK' ) ) . + Xml::submitButton( wfMessage( 'cancel' )->text(), array( 'name' => 'wpCancel' ) ) ) . "\n" . Xml::closeElement( 'tr' ) . "\n" . @@ -598,7 +598,7 @@ $this->loginSetCookie( $openid ); - $wgOut->setPageTitle( wfMsg( 'openidsuccess' ) ); + $wgOut->setPageTitle( wfMessage( 'openidsuccess' )->text() ); $wgOut->setRobotPolicy( 'noindex,nofollow' ); $wgOut->setArticleRelated( false ); $wgOut->addWikiMsg( 'openidsuccesstext', $wgUser->getName(), $openid ); @@ -800,7 +800,7 @@ strlen( $sreg['nickname'] ) > 0 ) { return $this->firstAvailable( $sreg['nickname'] ); } else { # try auto-generated - return $this->firstAvailable( wfMsg( 'openidusernameprefix' ) ); + return $this->firstAvailable( wfMessage( 'openidusernameprefix' )->text() ); } } diff --git a/SpecialOpenIDServer.body.php b/SpecialOpenIDServer.body.php index 8a4282f..96dfa73 100644 --- a/SpecialOpenIDServer.body.php +++ b/SpecialOpenIDServer.body.php @@ -614,12 +614,12 @@ $name = $this->UrlToUserName( $url ); $trust_root = $request->trust_root; - $instructions = wfMsg( 'openidserverlogininstructions', $url, $name, $trust_root ); + $instructions = wfMessage( 'openidserverlogininstructions', $url, $name, $trust_root )->text(); - $username = wfMsg( 'yourname' ); - $password = wfMsg( 'yourpassword' ); - $ok = wfMsg( 'ok' ); - $cancel = wfMsg( 'cancel' ); + $username = wfMessage( 'yourname' )->text(); + $password = wfMessage( 'yourpassword' )->text(); + $ok = wfMessage( 'ok' )->text(); + $cancel = wfMessage( 'cancel' )->text(); if ( !is_null( $msg ) ) { $wgOut->addHTML( "<p class='error'>{$msg}</p>" ); @@ -674,7 +674,7 @@ $password = $wgRequest->getText( 'wpPassword' ); if ( !isset( $password ) || strlen( $password ) == 0 ) { - return wfMsg( 'wrongpasswordempty' ); + return wfMessage( 'wrongpasswordempty' )->text(); } assert ( isset( $password ) && strlen( $password ) > 0 ); @@ -692,7 +692,7 @@ assert( isset( $user ) ); if ( !$user->checkPassword( $password ) ) { - return wfMsg( 'wrongpassword' ); + return wfMessage( 'wrongpassword' )->text(); } else { $id = $user->getId(); $wgUser = $user; @@ -711,21 +711,21 @@ $name = $this->UrlToUserName( $url ); $trust_root = $request->trust_root; - $instructions = wfMsg( 'openidtrustinstructions', $trust_root ); - $allow = wfMsg( 'openidallowtrust', $trust_root ); + $instructions = wfMessage( 'openidtrustinstructions', $trust_root )->text(); + $allow = wfMessage( 'openidallowtrust', $trust_root )->text(); if ( is_null( $sreg['policy_url'] ) ) { - $policy = wfMsg( 'openidnopolicy' ); + $policy = wfMessage( 'openidnopolicy' )->text(); } else { - $policy = wfMsg( 'openidpolicy', $sreg['policy_url'] ); + $policy = wfMessage( 'openidpolicy', $sreg['policy_url'] )->text(); } if ( isset( $msg ) ) { $wgOut->addHTML( "<p class='error'>{$msg}</p>" ); } - $ok = wfMsg( 'ok' ); - $cancel = wfMsg( 'cancel' ); + $ok = wfMessage( 'ok' )->text(); + $cancel = wfMessage( 'cancel' )->text(); $sk = $wgUser->getSkin(); @@ -742,12 +742,12 @@ foreach ( $fields as $field ) { $wgOut->addHTML( "<tr>" ); $wgOut->addHTML( "<th><label for='wpAllow{$field}'>" ); - $wgOut->addHTML( wfMsg( "openid$field" ) ); + $wgOut->addHTML( wfMessage( "openid$field" )->text() ); $wgOut->addHTML( "</label></th>" ); $value = $this->GetUserField( $wgUser, $field ); $wgOut->addHTML( "</td>" ); $wgOut->addHTML( "<td> " . ( ( is_null( $value ) ) ? '' : $value ) . "</td>" ); - $wgOut->addHTML( "<td>" . ( ( in_array( $field, $sreg['required'] ) ) ? wfMsg( 'openidrequired' ) : wfMsg( 'openidoptional' ) ) . "</td>" ); + $wgOut->addHTML( "<td>" . ( ( in_array( $field, $sreg['required'] ) ) ? wfMessage( 'openidrequired' )->text() : wfMessage( 'openidoptional' )->text() ) . "</td>" ); $wgOut->addHTML( "<td><input name='wpAllow{$field}' id='wpAllow{$field}' type='checkbox'" ); if ( !is_null( $value ) ) { $wgOut->addHTML( " value='on' checked='checked' />" ); diff --git a/SpecialOpenIDXRDS.body.php b/SpecialOpenIDXRDS.body.php index e01690e..37ca596 100644 --- a/SpecialOpenIDXRDS.body.php +++ b/SpecialOpenIDXRDS.body.php @@ -46,7 +46,7 @@ # so it'd be unusual to get here. if ( $wgOpenIDClientOnly ) { - wfHttpError( 404, "Not Found", wfMsg( 'openidclientonlytext' ) ); + wfHttpError( 404, "Not Found", wfMessage( 'openidclientonlytext' )->text() ); return; } @@ -62,7 +62,7 @@ /* pre-version-2.00 behaviour: OpenID Server was only supported for existing userpages if ( !$par ) { - wfHttpError( 404, "Not Found", wfMsg( 'openidnousername' ) ); + wfHttpError( 404, "Not Found", wfMessage( 'openidnousername' )->text() ); return; } */ @@ -71,7 +71,7 @@ /* pre-version-2.00 behaviour: OpenID Server was only supported for existing userpages if ( !$user || $user->getID() == 0 ) { - wfHttpError( 404, "Not Found", wfMsg( 'openidbadusername' ) ); + wfHttpError( 404, "Not Found", wfMessage( 'openidbadusername' )->text() ); return; } */ -- To view, visit https://gerrit.wikimedia.org/r/50604 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I76e744184228a5f20c26fb0575f0ff278fc0c437 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OpenID Gerrit-Branch: master Gerrit-Owner: Wikinaut <m...@tgries.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits