r101043 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101042‎ | r101043 | r101044 >
Date:20:48, 27 October 2011
Author:platonides
Status:ok
Tags:
Comment:
Removal of unused globals
Modified paths:
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)
  • /trunk/phase3/includes/diff/DifferenceEngine.php (modified) (history)
  • /trunk/phase3/includes/filerepo/File.php (modified) (history)
  • /trunk/phase3/includes/logging/LogEntry.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/diff/DifferenceEngine.php
@@ -175,7 +175,7 @@
176176 }
177177
178178 function showDiffPage( $diffOnly = false ) {
179 - global $wgUser, $wgOut, $wgRequest, $wgUseExternalEditor, $wgUseRCPatrol;
 179+ global $wgUser, $wgOut, $wgRequest, $wgUseExternalEditor;
180180 wfProfileIn( __METHOD__ );
181181
182182 # Allow frames except in certain special cases
@@ -509,7 +509,7 @@
510510 * Show the new revision of the page.
511511 */
512512 function renderNewRevision() {
513 - global $wgOut, $wgUser;
 513+ global $wgOut;
514514 wfProfileIn( __METHOD__ );
515515 $revHeader = $this->getRevisionHeader( $this->mNewRev );
516516 # Add "current version as of X" title
@@ -1023,8 +1023,6 @@
10241024 * @return bool
10251025 */
10261026 function loadRevisionData() {
1027 - global $wgUser;
1028 -
10291027 if ( $this->mRevisionsLoaded ) {
10301028 return true;
10311029 }
Index: trunk/phase3/includes/parser/Parser.php
@@ -3021,7 +3021,7 @@
30223022 * @private
30233023 */
30243024 function braceSubstitution( $piece, $frame ) {
3025 - global $wgContLang, $wgNonincludableNamespaces;
 3025+ global $wgNonincludableNamespaces;
30263026 wfProfileIn( __METHOD__ );
30273027 wfProfileIn( __METHOD__.'-setup' );
30283028
Index: trunk/phase3/includes/filerepo/File.php
@@ -710,7 +710,7 @@
711711 * @return MediaTransformOutput | false
712712 */
713713 function transform( $params, $flags = 0 ) {
714 - global $wgUseSquid, $wgServer;
 714+ global $wgUseSquid;
715715
716716 wfProfileIn( __METHOD__ );
717717 do {
Index: trunk/phase3/includes/logging/LogEntry.php
@@ -362,8 +362,6 @@
363363 * @return int If of the log entry
364364 */
365365 public function insert() {
366 - global $wgLogRestrictions;
367 -
368366 $dbw = wfGetDB( DB_MASTER );
369367 $id = $dbw->nextSequenceValue( 'logging_log_id_seq' );
370368
@@ -464,4 +462,4 @@
465463 return (int) $this->deleted;
466464 }
467465
468 -}
\ No newline at end of file
 466+}
Index: trunk/phase3/includes/Title.php
@@ -843,8 +843,6 @@
844844 * @return String the URL
845845 */
846846 public function getFullURL( $query = '', $variant = false ) {
847 - global $wgServer, $wgRequest;
848 -
849847 # Hand off all the decisions on urls to getLocalURL
850848 $url = $this->getLocalURL( $query, $variant );
851849
Index: trunk/phase3/includes/SkinTemplate.php
@@ -786,7 +786,6 @@
787787 * @return array
788788 */
789789 protected function buildContentNavigationUrls() {
790 - global $wgContLang;
791790 global $wgDisableLangConversion;
792791
793792 wfProfileIn( __METHOD__ );

Status & tagging log