Kill a bunch of unused $wgUser
This commit is contained in:
parent
9ac23e1ed5
commit
fdbb1752ab
18 changed files with 16 additions and 23 deletions
|
|
@ -3569,7 +3569,7 @@ class Article {
|
|||
* @param $cache Boolean
|
||||
*/
|
||||
public function outputWikiText( $text, $cache = true ) {
|
||||
global $wgParser, $wgUser, $wgOut, $wgEnableParserCache, $wgUseFileCache;
|
||||
global $wgParser, $wgOut, $wgEnableParserCache, $wgUseFileCache;
|
||||
|
||||
$popts = $wgOut->parserOptions();
|
||||
$popts->setTidy(true);
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ class EditPage {
|
|||
* the newly-edited page.
|
||||
*/
|
||||
function edit() {
|
||||
global $wgOut, $wgUser, $wgRequest;
|
||||
global $wgOut, $wgRequest;
|
||||
// Allow extensions to modify/prevent this form or submission
|
||||
if ( !wfRunHooks( 'AlternateEdit', array( &$this ) ) ) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -481,7 +481,7 @@ EOT
|
|||
* Show a notice that the file is from a shared repository
|
||||
*/
|
||||
protected function printSharedImageText() {
|
||||
global $wgOut, $wgUser;
|
||||
global $wgOut;
|
||||
|
||||
$this->loadFile();
|
||||
|
||||
|
|
|
|||
|
|
@ -443,7 +443,6 @@ class Linker {
|
|||
* @param $prefix String: optional prefix. As trail, only before instead of after.
|
||||
*/
|
||||
function makeLinkObj( $nt, $text= '', $query = '', $trail = '', $prefix = '' ) {
|
||||
global $wgUser;
|
||||
wfProfileIn( __METHOD__ );
|
||||
|
||||
$query = wfCgiToArray( $query );
|
||||
|
|
|
|||
|
|
@ -774,7 +774,6 @@ class LogViewer {
|
|||
* LogEventsList::NO_ACTION_LINK Don't show restore/unblock/block links
|
||||
*/
|
||||
function __construct( &$reader, $flags = 0 ) {
|
||||
global $wgUser;
|
||||
wfDeprecated(__METHOD__);
|
||||
$this->reader =& $reader;
|
||||
$this->reader->pager->mLogEventsList->flags = $flags;
|
||||
|
|
|
|||
|
|
@ -2996,7 +2996,7 @@ class Title {
|
|||
* arrays (errors) as values, or an error array with numeric indices if no pages were moved
|
||||
*/
|
||||
public function moveSubpages( $nt, $auth = true, $reason = '', $createRedirect = true ) {
|
||||
global $wgUser, $wgMaximumMovedPages;
|
||||
global $wgMaximumMovedPages;
|
||||
// Check permissions
|
||||
if( !$this->userCan( 'move-subpages' ) )
|
||||
return array( 'cant-move-subpages' );
|
||||
|
|
|
|||
|
|
@ -2375,7 +2375,6 @@ class User {
|
|||
* Log this user out.
|
||||
*/
|
||||
function logout() {
|
||||
global $wgUser;
|
||||
if( wfRunHooks( 'UserLogout', array(&$this) ) ) {
|
||||
$this->doLogout();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class ApiPatrol extends ApiBase {
|
|||
* Patrols the article or provides the reason the patrol failed.
|
||||
*/
|
||||
public function execute() {
|
||||
global $wgUser, $wgUseRCPatrol, $wgUseNPPatrol;
|
||||
global $wgUser;
|
||||
$params = $this->extractRequestParams();
|
||||
|
||||
if(!isset($params['token']))
|
||||
|
|
|
|||
|
|
@ -1398,7 +1398,7 @@ class LocalFileDeleteBatch {
|
|||
* Run the transaction
|
||||
*/
|
||||
function execute() {
|
||||
global $wgUser, $wgUseSquid;
|
||||
global $wgUseSquid;
|
||||
wfProfileIn( __METHOD__ );
|
||||
|
||||
$this->file->lock();
|
||||
|
|
@ -1540,7 +1540,7 @@ class LocalFileRestoreBatch {
|
|||
* So we save the batch and let the caller call cleanup()
|
||||
*/
|
||||
function execute() {
|
||||
global $wgUser, $wgLang;
|
||||
global $wgLang;
|
||||
if ( !$this->all && !$this->ids ) {
|
||||
// Do nothing
|
||||
return $this->file->repo->newGood();
|
||||
|
|
|
|||
|
|
@ -473,7 +473,7 @@ class ContribsPager extends ReverseChronologicalPager {
|
|||
* @todo This would probably look a lot nicer in a table.
|
||||
*/
|
||||
function formatRow( $row ) {
|
||||
global $wgLang, $wgUser, $wgContLang;
|
||||
global $wgLang, $wgContLang;
|
||||
wfProfileIn( __METHOD__ );
|
||||
|
||||
$sk = $this->getSkin();
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ class DeletedContribsPager extends IndexPager {
|
|||
function formatRow( $row ) {
|
||||
wfProfileIn( __METHOD__ );
|
||||
|
||||
global $wgLang, $wgUser;
|
||||
global $wgLang;
|
||||
|
||||
$sk = $this->getSkin();
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class MergehistoryForm {
|
|||
}
|
||||
|
||||
function execute() {
|
||||
global $wgOut, $wgUser;
|
||||
global $wgOut;
|
||||
|
||||
$wgOut->setPagetitle( wfMsgHtml( "mergehistory" ) );
|
||||
|
||||
|
|
@ -218,7 +218,7 @@ class MergehistoryForm {
|
|||
}
|
||||
|
||||
function formatRevisionRow( $row ) {
|
||||
global $wgUser, $wgLang;
|
||||
global $wgLang;
|
||||
|
||||
$rev = new Revision( $row );
|
||||
|
||||
|
|
@ -270,7 +270,7 @@ class MergehistoryForm {
|
|||
}
|
||||
|
||||
function merge() {
|
||||
global $wgOut, $wgUser;
|
||||
global $wgOut;
|
||||
# Get the titles directly from the IDs, in case the target page params
|
||||
# were spoofed. The queries are done based on the IDs, so it's best to
|
||||
# keep it consistent...
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ class SpecialNewpages extends SpecialPage {
|
|||
* @return string
|
||||
*/
|
||||
public function formatRow( $result ) {
|
||||
global $wgLang, $wgContLang, $wgUser;
|
||||
global $wgLang, $wgContLang;
|
||||
|
||||
$classes = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ function wfSpecialRemoveRestrictions() {
|
|||
}
|
||||
|
||||
function wfSpecialRemoveRestrictionsProcess( $r ) {
|
||||
global $wgUser, $wgRequest;
|
||||
global $wgRequest;
|
||||
$reason = $wgRequest->getVal( 'reason' );
|
||||
$result = $r->delete();
|
||||
$log = new LogPage( 'restrict' );
|
||||
|
|
|
|||
|
|
@ -833,7 +833,7 @@ class UndeleteForm {
|
|||
* @return string HTML
|
||||
*/
|
||||
function showDiff( $previousRev, $currentRev ) {
|
||||
global $wgOut, $wgUser;
|
||||
global $wgOut;
|
||||
|
||||
$diffEngine = new DifferenceEngine();
|
||||
$diffEngine->showDiffStyle();
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ class UploadForm {
|
|||
* @access private
|
||||
*/
|
||||
function processUpload(){
|
||||
global $wgUser, $wgOut, $wgFileExtensions, $wgLang;
|
||||
global $wgOut, $wgFileExtensions, $wgLang;
|
||||
$details = null;
|
||||
$value = null;
|
||||
$value = $this->internalProcessUpload( $details );
|
||||
|
|
|
|||
|
|
@ -948,8 +948,6 @@ class LoginForm {
|
|||
* @private
|
||||
*/
|
||||
function onCookieRedirectCheck( $type ) {
|
||||
global $wgUser;
|
||||
|
||||
if ( !$this->hasSessionCookie() ) {
|
||||
if ( $type == 'new' ) {
|
||||
return $this->mainLoginForm( wfMsgExt( 'nocookiesnew', array( 'parseinline' ) ) );
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ class LanguageWa extends Language {
|
|||
### "<day> d' <monthname>" for months starting with a vowel
|
||||
###
|
||||
function date( $ts, $adj = false, $format = true, $tc = false ) {
|
||||
global $wgUser;
|
||||
|
||||
if ( $adj ) { $ts = $this->userAdjust( $ts, $tc ); }
|
||||
$datePreference = $this->dateFormat( $format );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue