r111363 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111362‎ | r111363 | r111364 >
Date:12:47, 13 February 2012
Author:nikerabbit
Status:ok
Tags:
Comment:
Simpler this way, no BC code needed
Modified paths:
  • /trunk/extensions/Translate/utils/TranslationHelpers.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/TranslationHelpers.php
@@ -484,7 +484,7 @@
485485 }
486486
487487 protected static function makeGoogleQueryParams( $definition, $pair, $config ) {
488 - global $wgSitename, $wgVersion, $wgProxyKey, $wgRequest;
 488+ global $wgSitename, $wgVersion, $wgProxyKey, $wgUser;
489489 $options = array();
490490 $options['timeout'] = $config['timeout'];
491491
@@ -493,7 +493,7 @@
494494 'v' => '1.0',
495495 'langpair' => $pair,
496496 // Unique but not identifiable
497 - 'userip' => sha1( $wgProxyKey . ( method_exists( $wgRequest, 'getIP' ) ? $wgRequest->getIP() : wfGetIP() ) ),
 497+ 'userip' => sha1( $wgProxyKey . $wgUser->getName() ),
498498 'x-application' => "$wgSitename (MediaWiki $wgVersion; Translate " . TRANSLATE_VERSION . ")",
499499 );
500500

Status & tagging log