Index: trunk/extensions/Translate/utils/TranslationHelpers.php |
— | — | @@ -493,7 +493,7 @@ |
494 | 494 | 'v' => '1.0', |
495 | 495 | 'langpair' => $pair, |
496 | 496 | // Unique but not identifiable |
497 | | - 'userip' => sha1( $wgProxyKey . $wgRequest->getIP() ), |
| 497 | + 'userip' => sha1( $wgProxyKey . ( method_exists( $wgRequest, 'getIP' ) ? $wgRequest->getIP() : wfGetIP() ) ), |
498 | 498 | 'x-application' => "$wgSitename (MediaWiki $wgVersion; Translate " . TRANSLATE_VERSION . ")", |
499 | 499 | ); |
500 | 500 | |