http://www.mediawiki.org/wiki/Special:Code/MediaWiki/84713

Revision: 84713
Author:   platonides
Date:     2011-03-24 21:35:14 +0000 (Thu, 24 Mar 2011)
Log Message:
-----------
Use class name Html in canonical form.
Removed unused globals $wgHooks, $wgBlockAllowsUTEdit, $wgUser, $wgOut
$wgUser was already set global at function beginning.
Moved global out of switch

Modified Paths:
--------------
    trunk/phase3/includes/Block.php
    trunk/phase3/includes/api/ApiBlock.php
    trunk/phase3/includes/api/ApiQueryFilearchive.php
    trunk/phase3/includes/installer/Installer.php
    trunk/phase3/includes/specials/SpecialBlockList.php
    trunk/phase3/includes/specials/SpecialUnblock.php

Modified: trunk/phase3/includes/Block.php
===================================================================
--- trunk/phase3/includes/Block.php     2011-03-24 21:32:08 UTC (rev 84712)
+++ trunk/phase3/includes/Block.php     2011-03-24 21:35:14 UTC (rev 84713)
@@ -827,7 +827,7 @@
         */
        public function getRedactedName() {
                if ( $this->mAuto ) {
-                       return HTML::rawElement(
+                       return Html::rawElement(
                                'span',
                                array( 'class' => 'mw-autoblockid' ),
                                wfMessage( 'autoblockid', $this->mId )

Modified: trunk/phase3/includes/api/ApiBlock.php
===================================================================
--- trunk/phase3/includes/api/ApiBlock.php      2011-03-24 21:32:08 UTC (rev 
84712)
+++ trunk/phase3/includes/api/ApiBlock.php      2011-03-24 21:35:14 UTC (rev 
84713)
@@ -48,7 +48,7 @@
         * 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'] ) {

Modified: trunk/phase3/includes/api/ApiQueryFilearchive.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryFilearchive.php   2011-03-24 21:32:08 UTC 
(rev 84712)
+++ trunk/phase3/includes/api/ApiQueryFilearchive.php   2011-03-24 21:35:14 UTC 
(rev 84713)
@@ -151,7 +151,6 @@
                        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 );
                                }

Modified: trunk/phase3/includes/installer/Installer.php
===================================================================
--- trunk/phase3/includes/installer/Installer.php       2011-03-24 21:32:08 UTC 
(rev 84712)
+++ trunk/phase3/includes/installer/Installer.php       2011-03-24 21:35:14 UTC 
(rev 84713)
@@ -304,7 +304,7 @@
         * 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();

Modified: trunk/phase3/includes/specials/SpecialBlockList.php
===================================================================
--- trunk/phase3/includes/specials/SpecialBlockList.php 2011-03-24 21:32:08 UTC 
(rev 84712)
+++ trunk/phase3/includes/specials/SpecialBlockList.php 2011-03-24 21:35:14 UTC 
(rev 84713)
@@ -40,7 +40,7 @@
         * @param $par String title fragment
         */
        public function execute( $par ) {
-               global $wgUser, $wgOut, $wgRequest;
+               global $wgOut, $wgRequest;
 
                $this->setHeaders();
                $this->outputHeader();
@@ -204,7 +204,6 @@
        }
 
        function getFieldNames() {
-               global $wgUser;
                static $headers = null;
 
                if ( $headers == array() ) {
@@ -223,7 +222,7 @@
        }
 
        function formatValue( $name, $value ) {
-               global $wgOut, $wgLang, $wgUser;
+               global $wgLang, $wgUser;
 
                static $sk, $msg;
                if ( empty( $sk ) ) {

Modified: trunk/phase3/includes/specials/SpecialUnblock.php
===================================================================
--- trunk/phase3/includes/specials/SpecialUnblock.php   2011-03-24 21:32:08 UTC 
(rev 84712)
+++ trunk/phase3/includes/specials/SpecialUnblock.php   2011-03-24 21:35:14 UTC 
(rev 84713)
@@ -116,12 +116,13 @@
                                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 @@
 
                return true;
        }
-}
\ No newline at end of file
+}


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to