Move double $wgOut globals to the top, remove $wgLang duplicated global.
This commit is contained in:
parent
bfae0266bf
commit
3bc727867b
4 changed files with 4 additions and 10 deletions
|
|
@ -380,16 +380,14 @@ class SpecialContributions extends SpecialPage {
|
|||
* @param $type String
|
||||
*/
|
||||
protected function feed( $type ) {
|
||||
global $wgFeed, $wgFeedClasses, $wgFeedLimit;
|
||||
global $wgFeed, $wgFeedClasses, $wgFeedLimit, $wgOut;
|
||||
|
||||
if( !$wgFeed ) {
|
||||
global $wgOut;
|
||||
$wgOut->addWikiMsg( 'feed-unavailable' );
|
||||
return;
|
||||
}
|
||||
|
||||
if( !isset( $wgFeedClasses[$type] ) ) {
|
||||
global $wgOut;
|
||||
$wgOut->addWikiMsg( 'feed-invalid' );
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ class MovePageForm {
|
|||
# Disallow deletions of big articles
|
||||
$bigHistory = $article->isBigDeletion();
|
||||
if( $bigHistory && !$nt->userCan( 'bigdelete' ) ) {
|
||||
global $wgLang, $wgDeleteRevisionsLimit;
|
||||
global $wgDeleteRevisionsLimit;
|
||||
$this->showForm( array('delete-toobig', $wgLang->formatNum( $wgDeleteRevisionsLimit ) ) );
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -325,16 +325,14 @@ class SpecialNewpages extends IncludableSpecialPage {
|
|||
* @param $type String
|
||||
*/
|
||||
protected function feed( $type ) {
|
||||
global $wgFeed, $wgFeedClasses, $wgFeedLimit;
|
||||
global $wgFeed, $wgFeedClasses, $wgFeedLimit, $wgOut;
|
||||
|
||||
if ( !$wgFeed ) {
|
||||
global $wgOut;
|
||||
$wgOut->addWikiMsg( 'feed-unavailable' );
|
||||
return;
|
||||
}
|
||||
|
||||
if( !isset( $wgFeedClasses[$type] ) ) {
|
||||
global $wgOut;
|
||||
$wgOut->addWikiMsg( 'feed-invalid' );
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ class LoginForm {
|
|||
* @private
|
||||
*/
|
||||
function addNewAccount() {
|
||||
global $wgUser, $wgEmailAuthentication;
|
||||
global $wgUser, $wgEmailAuthentication, $wgOut;
|
||||
|
||||
# Create the account and abort if there's a problem doing so
|
||||
$u = $this->addNewAccountInternal();
|
||||
|
|
@ -197,7 +197,6 @@ class LoginForm {
|
|||
|
||||
# Send out an email authentication message if needed
|
||||
if( $wgEmailAuthentication && User::isValidEmailAddr( $u->getEmail() ) ) {
|
||||
global $wgOut;
|
||||
$error = $u->sendConfirmationMail();
|
||||
if( WikiError::isError( $error ) ) {
|
||||
$wgOut->addWikiMsg( 'confirmemail_sendfailed', $error->getMessage() );
|
||||
|
|
@ -224,7 +223,6 @@ class LoginForm {
|
|||
}
|
||||
} else {
|
||||
# Confirm that the account was created
|
||||
global $wgOut;
|
||||
$self = SpecialPage::getTitleFor( 'Userlogin' );
|
||||
$wgOut->setPageTitle( wfMsgHtml( 'accountcreated' ) );
|
||||
$wgOut->setArticleRelated( false );
|
||||
|
|
|
|||
Loading…
Reference in a new issue