From 2b39d8f00969b316ac77a52cb7015540b54f9d6e Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sun, 14 Jul 2024 14:39:57 +0200 Subject: [PATCH] Replace deprecated LogFormatter::newFromEntry Change-Id: Icd3316b7f475a09390be8787fae6a8b63dcd6418 --- includes/EchoCoreThanksPresentationModel.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/EchoCoreThanksPresentationModel.php b/includes/EchoCoreThanksPresentationModel.php index 26565e6a..f41bec43 100644 --- a/includes/EchoCoreThanksPresentationModel.php +++ b/includes/EchoCoreThanksPresentationModel.php @@ -4,7 +4,6 @@ namespace MediaWiki\Extension\Thanks; use DatabaseLogEntry; use LogEntry; -use LogFormatter; use LogPage; use MediaWiki\Extension\Notifications\Formatters\EchoEventPresentationModel; use MediaWiki\Language\RawMessage; @@ -104,10 +103,11 @@ class EchoCoreThanksPresentationModel extends EchoEventPresentationModel { if ( !$logEntry ) { return ''; } - $formatter = LogFormatter::newFromEntry( $logEntry ); + $services = MediaWikiServices::getInstance(); + $formatter = $services->getLogFormatterFactory()->newFromEntry( $logEntry ); $excerpt = $formatter->getPlainActionText(); // Turn wikitext into plaintext - $excerpt = MediaWikiServices::getInstance()->getCommentFormatter()->format( $excerpt ); + $excerpt = $services->getCommentFormatter()->format( $excerpt ); return Sanitizer::stripAllTags( $excerpt ); } else { // Try to get edit summary.