r110777 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110776‎ | r110777 | r110778 >
Date:20:23, 6 February 2012
Author:jeroendedauw
Status:ok (Comments)
Tags:
Comment:
fix compat
Modified paths:
  • /trunk/extensions/Translate/utils/TranslationHelpers.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/TranslationHelpers.php
@@ -493,7 +493,7 @@
494494 'v' => '1.0',
495495 'langpair' => $pair,
496496 // Unique but not identifiable
497 - 'userip' => sha1( $wgProxyKey . $wgRequest->getIP() ),
 497+ 'userip' => sha1( $wgProxyKey . ( method_exists( $wgRequest, 'getIP' ) ? $wgRequest->getIP() : wfGetIP() ) ),
498498 'x-application' => "$wgSitename (MediaWiki $wgVersion; Translate " . TRANSLATE_VERSION . ")",
499499 );
500500

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r106099kill wfGetIPjeroendedauw21:25, 13 December 2011

Comments

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

Could also use $wgUser->getName(), which doesn't have this issue.

Status & tagging log