From d581e9dd5a194b3a5b8584fd945a971f918d8932 Mon Sep 17 00:00:00 2001 From: Platonides Date: Thu, 27 Oct 2011 20:48:09 +0000 Subject: [PATCH] Removal of unused globals --- includes/SkinTemplate.php | 1 - includes/Title.php | 2 -- includes/diff/DifferenceEngine.php | 6 ++---- includes/filerepo/File.php | 2 +- includes/logging/LogEntry.php | 4 +--- includes/parser/Parser.php | 2 +- 6 files changed, 5 insertions(+), 12 deletions(-) diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 56adcffbe5..a6be3b9704 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -786,7 +786,6 @@ class SkinTemplate extends Skin { * @return array */ protected function buildContentNavigationUrls() { - global $wgContLang; global $wgDisableLangConversion; wfProfileIn( __METHOD__ ); diff --git a/includes/Title.php b/includes/Title.php index bbff110bcc..53f02382b3 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -843,8 +843,6 @@ class Title { * @return String the URL */ public function getFullURL( $query = '', $variant = false ) { - global $wgServer, $wgRequest; - # Hand off all the decisions on urls to getLocalURL $url = $this->getLocalURL( $query, $variant ); diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index bdea4eb73e..bb2f4f3dd4 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -175,7 +175,7 @@ class DifferenceEngine { } function showDiffPage( $diffOnly = false ) { - global $wgUser, $wgOut, $wgRequest, $wgUseExternalEditor, $wgUseRCPatrol; + global $wgUser, $wgOut, $wgRequest, $wgUseExternalEditor; wfProfileIn( __METHOD__ ); # Allow frames except in certain special cases @@ -509,7 +509,7 @@ CONTROL; * Show the new revision of the page. */ function renderNewRevision() { - global $wgOut, $wgUser; + global $wgOut; wfProfileIn( __METHOD__ ); $revHeader = $this->getRevisionHeader( $this->mNewRev ); # Add "current version as of X" title @@ -1023,8 +1023,6 @@ CONTROL; * @return bool */ function loadRevisionData() { - global $wgUser; - if ( $this->mRevisionsLoaded ) { return true; } diff --git a/includes/filerepo/File.php b/includes/filerepo/File.php index f31b72fa02..2fe73cce36 100644 --- a/includes/filerepo/File.php +++ b/includes/filerepo/File.php @@ -710,7 +710,7 @@ abstract class File { * @return MediaTransformOutput | false */ function transform( $params, $flags = 0 ) { - global $wgUseSquid, $wgServer; + global $wgUseSquid; wfProfileIn( __METHOD__ ); do { diff --git a/includes/logging/LogEntry.php b/includes/logging/LogEntry.php index 221fa2ec4f..82d1ff1619 100644 --- a/includes/logging/LogEntry.php +++ b/includes/logging/LogEntry.php @@ -362,8 +362,6 @@ class ManualLogEntry extends LogEntryBase { * @return int If of the log entry */ public function insert() { - global $wgLogRestrictions; - $dbw = wfGetDB( DB_MASTER ); $id = $dbw->nextSequenceValue( 'logging_log_id_seq' ); @@ -464,4 +462,4 @@ class ManualLogEntry extends LogEntryBase { return (int) $this->deleted; } -} \ No newline at end of file +} diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index c92e59f549..e281ff6698 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -3021,7 +3021,7 @@ class Parser { * @private */ function braceSubstitution( $piece, $frame ) { - global $wgContLang, $wgNonincludableNamespaces; + global $wgNonincludableNamespaces; wfProfileIn( __METHOD__ ); wfProfileIn( __METHOD__.'-setup' ); -- 2.20.1