r106099 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106098‎ | r106099 | r106100 >
Date:21:25, 13 December 2011
Author:jeroendedauw
Status:ok (Comments)
Tags:
Comment:
kill wfGetIP
Modified paths:
  • /trunk/extensions/Translate/utils/TranslationHelpers.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/TranslationHelpers.php
@@ -430,7 +430,7 @@
431431 }
432432
433433 protected static function makeGoogleQueryParams( $definition, $pair, $config ) {
434 - global $wgSitename, $wgVersion, $wgProxyKey;
 434+ global $wgSitename, $wgVersion, $wgProxyKey, $wgRequest;
435435 $options = array();
436436 $options['timeout'] = $config['timeout'];
437437
@@ -439,7 +439,7 @@
440440 'v' => '1.0',
441441 'langpair' => $pair,
442442 // Unique but not identifiable
443 - 'userip' => sha1( $wgProxyKey . wfGetIp() ),
 443+ 'userip' => sha1( $wgProxyKey . $wgRequest->getIP() ),
444444 'x-application' => "$wgSitename (MediaWiki $wgVersion; Translate " . TRANSLATE_VERSION . ")",
445445 );
446446

Follow-up revisions

RevisionCommit summaryAuthorDate
r110777fix compatjeroendedauw20:23, 6 February 2012

Comments

#Comment by Nikerabbit (talk | contribs)   20:08, 6 February 2012

Squeek, you broke BC.

#Comment by Jeroen De Dauw (talk | contribs)   20:13, 6 February 2012

With what? MediaWiki 1.12?

#Comment by Reedy (talk | contribs)   20:17, 6 February 2012

WebRequest->getIP() only came in somewhere between when 1.18 was branched, and when 1.18wmf1 was branched...

So it's only in what, 1.19 then?

#Comment by Jeroen De Dauw (talk | contribs)   20:23, 6 February 2012

This is what you get when people can't be bothered to add @since tags >_>

#Comment by Reedy (talk | contribs)   20:23, 6 February 2012

Fixed 3 minutes before your comment in r110776 ;)

Status & tagging log