Use class name Html in canonical form.
authorPlatonides <platonides@users.mediawiki.org>
Thu, 24 Mar 2011 21:35:14 +0000 (21:35 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Thu, 24 Mar 2011 21:35:14 +0000 (21:35 +0000)
Removed unused globals $wgHooks, $wgBlockAllowsUTEdit, $wgUser, $wgOut
$wgUser was already set global at function beginning.
Moved global out of switch

includes/Block.php
includes/api/ApiBlock.php
includes/api/ApiQueryFilearchive.php
includes/installer/Installer.php
includes/specials/SpecialBlockList.php
includes/specials/SpecialUnblock.php

index e810e62..5c0bc0c 100644 (file)
@@ -827,7 +827,7 @@ class Block {
         */
        public function getRedactedName() {
                if ( $this->mAuto ) {
-                       return HTML::rawElement(
+                       return Html::rawElement(
                                'span',
                                array( 'class' => 'mw-autoblockid' ),
                                wfMessage( 'autoblockid', $this->mId )
index 98d88ac..37e3a27 100644 (file)
@@ -48,7 +48,7 @@ class ApiBlock extends ApiBase {
         * of success. If it fails, the result will specify the nature of the error.
         */
        public function execute() {
-               global $wgUser, $wgBlockAllowsUTEdit;
+               global $wgUser;
                $params = $this->extractRequestParams();
 
                if ( $params['gettoken'] ) {
index fa88846..e8ce31f 100644 (file)
@@ -151,7 +151,6 @@ class ApiQueryFilearchive extends ApiQueryBase {
                        if ( $fld_description ) {
                                $file['description'] = $row->fa_description;
                                if ( isset( $prop['parseddescription'] ) ) {
-                                       global $wgUser;
                                        $file['parseddescription'] = $wgUser->getSkin()->formatComment(
                                                $row->fa_description, $row->fa_name );
                                }
index 2d4cfbf..ef3f63c 100644 (file)
@@ -304,7 +304,7 @@ abstract class Installer {
         * Constructor, always call this from child classes.
         */
        public function __construct() {
-               global $wgExtensionMessagesFiles, $wgUser, $wgHooks;
+               global $wgExtensionMessagesFiles, $wgUser;
 
                // Disable the i18n cache and LoadBalancer
                Language::getLocalisationCache()->disableBackend();
index 8b85663..79cb97b 100644 (file)
@@ -40,7 +40,7 @@ class SpecialBlockList extends SpecialPage {
         * @param $par String title fragment
         */
        public function execute( $par ) {
-               global $wgUser, $wgOut, $wgRequest;
+               global $wgOut, $wgRequest;
 
                $this->setHeaders();
                $this->outputHeader();
@@ -204,7 +204,6 @@ class BlockListPager extends TablePager {
        }
 
        function getFieldNames() {
-               global $wgUser;
                static $headers = null;
 
                if ( $headers == array() ) {
@@ -223,7 +222,7 @@ class BlockListPager extends TablePager {
        }
 
        function formatValue( $name, $value ) {
-               global $wgOut, $wgLang, $wgUser;
+               global $wgLang, $wgUser;
 
                static $sk, $msg;
                if ( empty( $sk ) ) {
index 3eba8b7..ab444d2 100644 (file)
@@ -116,12 +116,13 @@ class SpecialUnblock extends SpecialPage {
                                unset( $fields['Name'] );
 
                        } else {
+                               global $wgUser;
+
                                $fields['Target']['default'] = $target;
                                $fields['Target']['type'] = 'hidden';
                                switch( $type ){
                                        case Block::TYPE_USER:
                                        case Block::TYPE_IP:
-                                               global $wgUser;
                                                $skin = $wgUser->getSkin();
                                                $fields['Name']['default'] = $skin->link(
                                                        $target->getUserPage(),
@@ -202,4 +203,4 @@ class SpecialUnblock extends SpecialPage {
 
                return true;
        }
-}
\ No newline at end of file
+}