From a238b3c8cea99153a09ec17a25cd7d1875ac8e3a Mon Sep 17 00:00:00 2001 From: paladox Date: Sat, 20 Mar 2021 23:46:42 +0000 Subject: [PATCH] Update Extension.php --- includes/Extension.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/includes/Extension.php b/includes/Extension.php index 2a78e6e..2a3b29c 100644 --- a/includes/Extension.php +++ b/includes/Extension.php @@ -25,7 +25,6 @@ namespace LinkTitles; use CommentStoreComment; -use ContentHandler; use MediaWiki\Revision\RenderedRevision; use MediaWiki\Revision\SlotRecord; use Status; @@ -43,11 +42,18 @@ class Extension { * * This handler is used if the parseOnEdit configuration option is set. */ - public static function onMultiContentSave( RenderedRevision $renderedRevision, User $user, CommentStoreComment $summary, $flags, Status $hookStatus ) { + public static function onMultiContentSave( + RenderedRevision $renderedRevision, + User $user, + CommentStoreComment $summary, + $flags, + Status $hookStatus + ) { $config = new Config(); if ( !$config->parseOnEdit ) return true; - + $revision = $renderedRevision->getRevision(); + $title = $revision->getPageAsLinkTarget(); $slots = $revision->getSlots(); $content = $slots->getContent( SlotRecord::MAIN );