r69758 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69757‎ | r69758 | r69759 >
Date:22:00, 22 July 2010
Author:reedy
Status:ok
Tags:
Comment:
Remove some unused globals
Modified paths:
  • /trunk/phase3/includes/api/ApiDelete.php (modified) (history)
  • /trunk/phase3/includes/api/ApiMain.php (modified) (history)
  • /trunk/phase3/includes/api/ApiProtect.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiProtect.php
@@ -37,7 +37,7 @@
3838 }
3939
4040 public function execute() {
41 - global $wgUser, $wgRestrictionTypes, $wgRestrictionLevels;
 41+ global $wgUser, $wgRestrictionLevels;
4242 $params = $this->extractRequestParams();
4343
4444 $titleObj = null;
Index: trunk/phase3/includes/api/ApiDelete.php
@@ -47,8 +47,6 @@
4848 * result object.
4949 */
5050 public function execute() {
51 - global $wgUser;
52 -
5351 $params = $this->extractRequestParams();
5452
5553 $this->requireOnlyOneParameter( $params, 'title', 'pageid' );
Index: trunk/phase3/includes/api/ApiMain.php
@@ -521,7 +521,7 @@
522522 * @param $module object An Api module
523523 */
524524 protected function checkExecutePermissions( $module ) {
525 - global $wgUser, $wgGroupPermissions;
 525+ global $wgUser;
526526 if ( $module->isReadMode() && !in_array( 'read', User::getGroupPermissions( array( '*' ) ), true ) &&
527527 !$wgUser->isAllowed( 'read' ) )
528528 {

Status & tagging log