r69877 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69876‎ | r69877 | r69878 >
Date:17:12, 25 July 2010
Author:reedy
Status:ok
Tags:
Comment:
Remove some more unused globals

Kill a couple of other unused variables
Modified paths:
  • /trunk/extensions/CategoryTree/CategoryPageSubclass.php (modified) (history)
  • /trunk/extensions/CategoryTree/CategoryTree.php (modified) (history)
  • /trunk/extensions/CategoryTree/CategoryTreeFunctions.php (modified) (history)
  • /trunk/extensions/CategoryTree/CategoryTreePage.php (modified) (history)
  • /trunk/extensions/Collection/Collection.body.php (modified) (history)
  • /trunk/extensions/Collection/Collection.hooks.php (modified) (history)
  • /trunk/extensions/GlobalUsage/GlobalUsageQuery.php (modified) (history)
  • /trunk/extensions/ImageMap/ImageMap_body.php (modified) (history)
  • /trunk/extensions/SpamBlacklist/SpamBlacklist_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ImageMap/ImageMap_body.php
@@ -27,7 +27,7 @@
2828 const NONE = 4;
2929
3030 static function render( $input, $params, $parser ) {
31 - global $wgScriptPath, $wgUser, $wgUrlProtocols, $wgNoFollowLinks;
 31+ global $wgScriptPath, $wgUrlProtocols, $wgNoFollowLinks;
3232 wfLoadExtensionMessages( 'ImageMap' );
3333
3434 $lines = explode( "\n", $input );
Index: trunk/extensions/Collection/Collection.hooks.php
@@ -79,7 +79,6 @@
8080 global $wgCollectionArticleNamespaces;
8181 global $wgCollectionFormats;
8282 global $wgCollectionPortletFormats;
83 - global $wgScriptPath;
8483
8584 if ( is_null( $wgTitle ) || !$wgTitle->exists() ) {
8685 return;
@@ -237,17 +236,13 @@
238237
239238 static function renderBookCreatorBox( $mode = '' ) {
240239 global $wgArticle;
241 - global $wgCollectionArticleNamespaces;
242240 global $wgCollectionStyleVersion;
243 - global $wgCollectionVersion;
244241 global $wgJsMimeType;
245242 global $wgOut;
246243 global $wgScriptPath;
247244 global $wgTitle;
248245 global $wgUser;
249246
250 - $namespace = $wgTitle->getNamespace();
251 -
252247 wfLoadExtensionMessages( 'CollectionCore' );
253248
254249 $sk = $wgUser->getSkin();
@@ -403,10 +398,7 @@
404399 }
405400
406401 static function getBookCreatorBoxAddRemoveLink( $sk, $imagePath, $ajaxHint, $oldid ) {
407 - global $wgArticle;
408 - global $wgJsMimeType;
409 - global $wgTitle;
410 - global $wgScriptPath;
 402+ global $wgArticle, $wgTitle;
411403
412404 $namespace = $wgTitle->getNamespace();
413405 $ptext = $wgTitle->getPrefixedText();
Index: trunk/extensions/Collection/Collection.body.php
@@ -43,7 +43,6 @@
4444 global $wgRequest;
4545 global $wgUser;
4646 global $wgContLang;
47 - global $wgCommunityCollectionNamespace;
4847 global $wgCollectionMaxArticles;
4948 global $wgTitle;
5049
@@ -663,7 +662,6 @@
664663 }
665664
666665 static function addCategory( $title ) {
667 - global $wgOut;
668666 global $wgCollectionMaxArticles;
669667 global $wgCollectionArticleNamespaces;
670668
@@ -685,7 +683,7 @@
686684 'cl_to' => $title->getDBkey(),
687685 );
688686 $res = $db->select( $tables, $fields, $where, __METHOD__, $options );
689 - $members = array();
 687+
690688 $count = 0;
691689 $limitExceeded = false;
692690 while ( $row = $db->fetchObject( $res ) ) {
Index: trunk/extensions/GlobalUsage/GlobalUsageQuery.php
@@ -9,7 +9,6 @@
1010 private $hasMore = false;
1111 private $filterLocal = false;
1212 private $result;
13 - private $continue;
1413 private $reversed = false;
1514
1615 /**
Index: trunk/extensions/SpamBlacklist/SpamBlacklist_body.php
@@ -190,7 +190,7 @@
191191 * @return Matched text if the edit should not be allowed, false otherwise
192192 */
193193 function filter( &$title, $text, $section, $editsummary = '', EditPage &$editPage = null ) {
194 - global $wgVersion, $wgOut, $wgParser, $wgUser;
 194+ global $wgParser, $wgUser;
195195
196196 $fname = 'wfSpamBlacklistFilter';
197197 wfProfileIn( $fname );
Index: trunk/extensions/CategoryTree/CategoryPageSubclass.php
@@ -31,7 +31,7 @@
3232 * Add a subcategory to the internal lists
3333 */
3434 function addSubcategoryObject( $cat, $sortkey, $pageLength ) {
35 - global $wgContLang, $wgOut, $wgRequest;
 35+ global $wgRequest;
3636
3737 $title = $cat->getTitle();
3838
Index: trunk/extensions/CategoryTree/CategoryTreePage.php
@@ -23,7 +23,6 @@
2424 * Constructor
2525 */
2626 function __construct() {
27 - global $wgOut;
2827 SpecialPage::SpecialPage( 'CategoryTree', '', true );
2928 wfLoadExtensionMessages( 'CategoryTree' );
3029 }
Index: trunk/extensions/CategoryTree/CategoryTree.php
@@ -362,7 +362,7 @@
363363 * OutputPageMakeCategoryLinks hook, override category links
364364 */
365365 function efCategoryTreeOutputPageMakeCategoryLinks( $out, &$categories, &$links ) {
366 - global $wgContLang, $wgCategoryTreePageCategoryOptions;
 366+ global $wgCategoryTreePageCategoryOptions;
367367
368368 $ct = new CategoryTree( $wgCategoryTreePageCategoryOptions );
369369
Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php
@@ -792,8 +792,6 @@
793793 * Creates a Title object from a user provided (and thus unsafe) string
794794 */
795795 static function makeTitle( $title ) {
796 - global $wgContLang, $wgCanonicalNamespaceNames;
797 -
798796 $title = trim( $title );
799797
800798 if ( $title === null || $title === '' || $title === false ) {

Status & tagging log