From: umherirrender Date: Sun, 28 Dec 2014 13:42:14 +0000 (+0100) Subject: Use content language for edit summary on upload overwrite X-Git-Tag: 1.31.0-rc.0~12796^2 X-Git-Url: http://git.cyclocoop.org///%22%40url%40//%22?a=commitdiff_plain;h=d2a036791490949ace48300d710607dd97148da3;p=lhc%2Fweb%2Fwiklou.git Use content language for edit summary on upload overwrite The edit summary for the null revision on upload overwrite was in the user language and not in content language Possible a regression from Idf281898d8a5a023a0b9ce3bc90b3ca55c1a6376 Bug: T72293 Change-Id: Ie70a3874e170b3849e91265e0c9c61da838f2d20 --- diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index eb0f654b8d..94ef306e6d 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -1411,7 +1411,10 @@ class LocalFile extends File { if ( $exists ) { # Create a null revision $latest = $descTitle->getLatestRevID(); - $editSummary = LogFormatter::newFromEntry( $logEntry )->getPlainActionText(); + // Use own context to get the action text in content language + $formatter = LogFormatter::newFromEntry( $logEntry ); + $formatter->setContext( RequestContext::newExtraneousContext( $descTitle ) ); + $editSummary = $formatter->getPlainActionText(); $nullRevision = Revision::newNullRevision( $dbw,