From d2a036791490949ace48300d710607dd97148da3 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sun, 28 Dec 2014 14:42:14 +0100 Subject: [PATCH] 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 --- includes/filerepo/file/LocalFile.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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, -- 2.20.1