Replace deprecated Linker::formatComment

Bug: T324906
Follow-Up: Ibe0092a96d96f6fa9d93991418b723f3e70e1b75
Change-Id: I375fe9114429057f7a0220fee50cb75d4e39864b
This commit is contained in:
Umherirrender 2023-08-03 23:37:32 +02:00
parent 8a3f47e070
commit 9017ad5d76

View file

@ -2,7 +2,6 @@
namespace MediaWiki\Extension\Notifications\Formatters; namespace MediaWiki\Extension\Notifications\Formatters;
use Linker;
use MediaWiki\Language\RawMessage; use MediaWiki\Language\RawMessage;
use MediaWiki\MediaWikiServices; use MediaWiki\MediaWikiServices;
use MediaWiki\Revision\RevisionRecord; use MediaWiki\Revision\RevisionRecord;
@ -59,7 +58,7 @@ class EchoEditUserPagePresentationModel extends EchoEventPresentationModel {
$revision = $this->event->getRevision(); $revision = $this->event->getRevision();
if ( $revision && $revision->getComment() && $this->userCan( RevisionRecord::DELETED_COMMENT ) ) { if ( $revision && $revision->getComment() && $this->userCan( RevisionRecord::DELETED_COMMENT ) ) {
$summary = $revision->getComment()->text; $summary = $revision->getComment()->text;
$summary = Linker::formatComment( $summary ); $summary = MediaWikiServices::getInstance()->getCommentFormatter()->format( $summary );
$summary = Sanitizer::stripAllTags( $summary ); $summary = Sanitizer::stripAllTags( $summary );
} else { } else {
$summary = false; $summary = false;