From: Platonides Date: Thu, 24 Mar 2011 21:35:14 +0000 (+0000) Subject: Use class name Html in canonical form. X-Git-Tag: 1.31.0-rc.0~31203 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=b37e81b76b29a2b5f9773bedca3bf694fac10f35;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/includes/Block.php b/includes/Block.php index e810e62856..5c0bc0ca1f 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -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 ) diff --git a/includes/api/ApiBlock.php b/includes/api/ApiBlock.php index 98d88acf94..37e3a27943 100644 --- a/includes/api/ApiBlock.php +++ b/includes/api/ApiBlock.php @@ -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'] ) { diff --git a/includes/api/ApiQueryFilearchive.php b/includes/api/ApiQueryFilearchive.php index fa888461f1..e8ce31f370 100644 --- a/includes/api/ApiQueryFilearchive.php +++ b/includes/api/ApiQueryFilearchive.php @@ -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 ); } diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 2d4cfbfb95..ef3f63ca20 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -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(); diff --git a/includes/specials/SpecialBlockList.php b/includes/specials/SpecialBlockList.php index 8b856638ce..79cb97b40e 100644 --- a/includes/specials/SpecialBlockList.php +++ b/includes/specials/SpecialBlockList.php @@ -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 ) ) { diff --git a/includes/specials/SpecialUnblock.php b/includes/specials/SpecialUnblock.php index 3eba8b769e..ab444d2d77 100644 --- a/includes/specials/SpecialUnblock.php +++ b/includes/specials/SpecialUnblock.php @@ -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 +}