r80832 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80831‎ | r80832 | r80833 >
Date:20:18, 23 January 2011
Author:ialex
Status:deferred
Tags:
Comment:
Removed unused globals (and an empty function)
Modified paths:
  • /trunk/extensions/AjaxTest/AjaxTest.php (modified) (history)
  • /trunk/extensions/Call/Call_body.php (modified) (history)
  • /trunk/extensions/ConfirmAccount/ConfirmAccount_body.php (modified) (history)
  • /trunk/extensions/EmailPage/EmailPage_body.php (modified) (history)
  • /trunk/extensions/Form/Form.body.php (modified) (history)
  • /trunk/extensions/I18nTags/I18nTags.php (modified) (history)
  • /trunk/extensions/InlineEditor/InlineEditor.class.php (modified) (history)
  • /trunk/extensions/PageNotice/PageNotice.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Call/Call_body.php
@@ -36,7 +36,6 @@
3737
3838
3939 function execute( $par ) {
40 - global $wgParser;
4140 global $wgOut, $wgRequest, $wgRawHtml, $wgUser;
4241 $oldRawHtml = $wgRawHtml;
4342 $wgRawHtml = false; // disable raw html if it's enabled as this could be XSS security risk
Index: trunk/extensions/InlineEditor/InlineEditor.class.php
@@ -204,7 +204,7 @@
205205 * @param $output OutputPage
206206 */
207207 public function render( &$output ) {
208 - global $wgParser, $wgHooks, $wgRequest, $wgExtensionAssetsPath, $wgDisableOutputCompression;
 208+ global $wgHooks, $wgRequest, $wgExtensionAssetsPath, $wgDisableOutputCompression;
209209
210210 // if the page is being saved, retrieve the wikitext from the JSON
211211 if ( $wgRequest->wasPosted() ) {
Index: trunk/extensions/PageNotice/PageNotice.php
@@ -33,7 +33,7 @@
3434
3535
3636 function wfPageNoticeHook( &$out, &$text ) {
37 - global $wgTitle, $wgParser;
 37+ global $wgTitle;
3838 $name = $wgTitle->getPrefixedDBKey();
3939 $ns = $wgTitle->getNamespace();
4040
Index: trunk/extensions/AjaxTest/AjaxTest.php
@@ -32,7 +32,7 @@
3333 'author' => 'Daniel Kinzler',
3434 'descriptionmsg' => 'ajaxtest-desc',
3535 );
36 -$wgExtensionFunctions[] = 'efAjaxTestSetup';
 36+
3737 $wgSpecialPages['AjaxTest'] = 'AjaxTestPage';
3838
3939 $dir = dirname( __FILE__ ) . '/';
@@ -46,13 +46,6 @@
4747 $wgAjaxExportList[] = 'efAjaxTest';
4848
4949 /**
50 - * Hook it up
51 - */
52 -function efAjaxTestSetup() {
53 - global $wgParser, $wgCategoryTreeAllowTag;
54 -}
55 -
56 -/**
5750 * Entry point for Ajax, registered in $wgAjaxExportList.
5851 * This loads CategoryTreeFunctions.php and calls CategoryTree::ajax()
5952 */
Index: trunk/extensions/EmailPage/EmailPage_body.php
@@ -25,7 +25,7 @@
2626 * Override SpecialPage::execute($param = '')
2727 */
2828 function execute( $param ) {
29 - global $wgOut, $wgUser, $wgRequest, $wgParser, $wgEmailPageContactsCat, $wgGroupPermissions, $wgSitename,
 29+ global $wgOut, $wgUser, $wgRequest, $wgEmailPageContactsCat, $wgGroupPermissions, $wgSitename,
3030 $wgRecordAdminCategory, $wgEmailPageCss, $wgEmailPageAllowAllUsers, $wgEmergencyContact;
3131
3232 $db = wfGetDB( DB_SLAVE );
Index: trunk/extensions/Form/Form.body.php
@@ -89,7 +89,7 @@
9090 }
9191
9292 function showForm( $form, $errmsg = null ) {
93 - global $wgOut, $wgRequest, $wgParser, $wgUser, $wgSpecialFormRecaptcha;
 93+ global $wgOut, $wgRequest, $wgUser, $wgSpecialFormRecaptcha;
9494
9595 $self = $this->getTitle( $form->name );
9696
@@ -505,4 +505,4 @@
506506 return '';
507507 }
508508 }
509 -}
\ No newline at end of file
 509+}
Index: trunk/extensions/I18nTags/I18nTags.php
@@ -27,7 +27,6 @@
2828 $wgHooks['ParserFirstCallInit'][] = 'efI18nTagsInit';
2929
3030 function efI18nTagsInit( &$parser ) {
31 - global $wgParser;
3231 $class = 'I18nTags';
3332 $parser->setHook( 'formatnum', array($class, 'formatNumber') );
3433 $parser->setHook( 'grammar', array($class, 'grammar') );
Index: trunk/extensions/ConfirmAccount/ConfirmAccount_body.php
@@ -770,7 +770,6 @@
771771 * @return string $linkList, list of clickable links
772772 */
773773 public static function parseLinks( $text ) {
774 - global $wgParser, $wgUser;
775774 # Don't let this get flooded
776775 $max = 10;
777776 $count = 0;

Status & tagging log