r59776 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59775‎ | r59776 | r59777 >
Date:23:14, 6 December 2009
Author:siebrand
Status:deferred
Tags:
Comment:
Remove unneeded global
Modified paths:
  • /trunk/extensions/Translate/SpecialManageGroups.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/SpecialManageGroups.php
@@ -38,8 +38,11 @@
3939 $this->importForm( $cache, $group, $code );
4040 } else {
4141 global $wgLang, $wgOut;
 42+
4243 $groups = MessageGroups::singleton()->getGroups();
 44+
4345 $wgOut->wrapWikiMsg( '==$1==', 'translate-manage-listgroups' );
 46+
4447 foreach ( $groups as $group ) {
4548 if ( !$group instanceof FileBasedMessageGroup ) continue;
4649
@@ -47,6 +50,7 @@
4851 $wgOut->addHtml( $link );
4952
5053 $cache = new MessageGroupCache( $group );
 54+
5155 if ( $cache->exists() ) {
5256 $timestamp = wfTimestamp( TS_MW, $cache->getTimestamp() );
5357 $wgOut->addWikiMsg( 'translate-manage-cacheat',
@@ -56,16 +60,16 @@
5761 } else {
5862 $wgOut->addWikiMsg( 'translate-manage-newgroup' );
5963 }
 64+
6065 $wgOut->addHtml( '<hr>' );
6166 }
6267
63 - global $wgOut;
64 -
6568 $wgOut->wrapWikiMsg( '==$1==', 'translate-manage-listgroups-old' );
6669 $wgOut->addHTML( '<ul>' );
6770
6871 foreach ( $groups as $group ) {
6972 if ( $group instanceof FileBasedMessageGroup ) continue;
 73+
7074 $wgOut->addHtml( Xml::element( 'li', null, $group->getLabel() ) );
7175 }
7276

Status & tagging log