r98890 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98889‎ | r98890 | r98891 >
Date:20:01, 4 October 2011
Author:reedy
Status:ok
Tags:
Comment:
Remove some unused variables. Where applicable, also remove method call (if no-op by not changing the class, and returned value is never used)
Modified paths:
  • /trunk/extensions/Translate/ffs/MediaWikiExtensions.php (modified) (history)
  • /trunk/extensions/Translate/ffs/ToolserverTextdomains.php (modified) (history)
  • /trunk/extensions/Translate/specials/SpecialManageGroups.php (modified) (history)
  • /trunk/extensions/Translate/tag/SpecialPageTranslation.php (modified) (history)
  • /trunk/extensions/Translate/utils/MessageGroupStats.php (modified) (history)
  • /trunk/extensions/Translate/utils/MessageIndex.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/tag/SpecialPageTranslation.php
@@ -623,7 +623,7 @@
624624 }
625625
626626 if ( !$hasen ) {
627 - $job = RenderJob::newJob( $en )->insert();
 627+ RenderJob::newJob( $en )->insert();
628628 }
629629 }
630630
Index: trunk/extensions/Translate/utils/MessageIndex.php
@@ -67,7 +67,7 @@
6868 $this->store( $new );
6969 $this->clearMessageGroupStats( $old, $new );
7070 }
71 -
 71+
7272 /**
7373 * Purge message group stats when set of keys have changed.
7474 */
@@ -194,7 +194,7 @@
195195
196196 protected function store( array $array ) {
197197 $key = wfMemckey( $this->key );
198 - $data = $this->cache->set( $key, $array );
 198+ $this->cache->set( $key, $array );
199199 }
200200
201201 }
Index: trunk/extensions/Translate/utils/MessageGroupStats.php
@@ -40,7 +40,6 @@
4141 * @return Array
4242 */
4343 public static function forItem( $id, $code ) {
44 - $group = MessageGroups::getGroup( $id );
4544 $res = self::selectRowsIdLang( $id, $code );
4645 $stats = self::extractResults( $res );
4746
@@ -163,7 +162,7 @@
164163 (int)$row->tgs_fuzzy
165164 );
166165 }
167 -
 166+
168167 protected static function forLanguageInternal( $code, $stats = array() ) {
169168 $res = self::selectRowsIdLang( null, $code );
170169 $stats = self::extractResults( $res, $stats );
@@ -186,8 +185,8 @@
187186 return $flattened;
188187 }
189188
190 -
191189
 190+
192191 protected static function forGroupInternal( $group, $stats = array() ) {
193192 $id = $group->getId();
194193 $res = self::selectRowsIdLang( $id, null );
@@ -199,7 +198,7 @@
200199 if ( isset( $stats[$id][$code] ) ) continue;
201200 $stats[$id][$code] = self::forItemInternal( $stats, $group, $code );
202201 }
203 -
 202+
204203 return $stats;
205204 }
206205
@@ -217,7 +216,7 @@
218217 $res = $dbr->select( self::TABLE, '*', $conds, __METHOD__ );
219218 return $res;
220219 }
221 -
 220+
222221 protected static function forItemInternal( &$stats, $group, $code ) {
223222 $id = $group->getId();
224223
@@ -229,7 +228,7 @@
230229 $ids = array_unique( self::expandAggregates( $group ) );
231230 $res = self::selectRowsIdLang( $ids, $code );
232231 $stats = self::extractResults( $res, $stats );
233 -
 232+
234233 $aggregates = array( 0, 0, 0 );
235234 foreach ( $group->getGroups() as $sid => $sgroup ) {
236235 if ( !isset( $stats[$sid][$code] ) ) {
Index: trunk/extensions/Translate/specials/SpecialManageGroups.php
@@ -426,11 +426,6 @@
427427 $wgLang->formatNum( count( $modified ) )
428428 );
429429
430 - $formParams = array(
431 - 'method' => 'post',
432 - 'action' => $this->getTitle()->getFullURL( array( 'group' => $group->getId() ) ),
433 - );
434 -
435430 if ( $this->user->isAllowed( 'translate-manage' ) ) {
436431 $this->out->addHTML( $this->rebuildButton( $group, $codes, 'import' ) );
437432 }
Index: trunk/extensions/Translate/ffs/MediaWikiExtensions.php
@@ -225,6 +225,4 @@
226226
227227 return array();
228228 }
229 -
230 -
231229 }
Index: trunk/extensions/Translate/ffs/ToolserverTextdomains.php
@@ -29,7 +29,6 @@
3030 }
3131
3232 protected function processGroups( $groups ) {
33 - $configureData = $this->loadConfigureExtensionData();
3433 $fixedGroups = array();
3534 foreach ( $groups as $g ) {
3635 if ( !is_array( $g ) ) {

Status & tagging log