mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-11-23 22:44:42 +00:00
Merge "Replace deprecated LogFormatter::newFromEntry"
This commit is contained in:
commit
fa8fa48ebc
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue