mirror of
https://github.com/diocloid/LinkTitles.git
synced 2025-07-13 01:39:30 +02:00
Update Extension.php
This commit is contained in:
@ -25,7 +25,6 @@
|
|||||||
namespace LinkTitles;
|
namespace LinkTitles;
|
||||||
|
|
||||||
use CommentStoreComment;
|
use CommentStoreComment;
|
||||||
use ContentHandler;
|
|
||||||
use MediaWiki\Revision\RenderedRevision;
|
use MediaWiki\Revision\RenderedRevision;
|
||||||
use MediaWiki\Revision\SlotRecord;
|
use MediaWiki\Revision\SlotRecord;
|
||||||
use Status;
|
use Status;
|
||||||
@ -43,11 +42,18 @@ class Extension {
|
|||||||
*
|
*
|
||||||
* This handler is used if the parseOnEdit configuration option is set.
|
* 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();
|
$config = new Config();
|
||||||
if ( !$config->parseOnEdit ) return true;
|
if ( !$config->parseOnEdit ) return true;
|
||||||
|
|
||||||
$revision = $renderedRevision->getRevision();
|
$revision = $renderedRevision->getRevision();
|
||||||
|
$title = $revision->getPageAsLinkTarget();
|
||||||
$slots = $revision->getSlots();
|
$slots = $revision->getSlots();
|
||||||
$content = $slots->getContent( SlotRecord::MAIN );
|
$content = $slots->getContent( SlotRecord::MAIN );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user