mirror of
https://github.com/diocloid/LinkTitles.git
synced 2025-07-13 01:39:30 +02:00
Fixed issue #60: replaced deprecated method doEditContent with PageUpdater::saveRevision
This commit is contained in:
@ -107,12 +107,12 @@ class Extension {
|
|||||||
$result = $linker->linkContent( $source );
|
$result = $linker->linkContent( $source );
|
||||||
if ( $result ) {
|
if ( $result ) {
|
||||||
$content = $source->getContent()->getContentHandler()->unserializeContent( $result );
|
$content = $source->getContent()->getContentHandler()->unserializeContent( $result );
|
||||||
$source->getPage()->doEditContent(
|
|
||||||
$content,
|
$updater = $source->getPage()->newPageUpdater( $context->getUser());
|
||||||
\wfMessage( 'linktitles-bot-comment', self::URL ),
|
$updater->setContent( SlotRecord::MAIN, $content );
|
||||||
EDIT_MINOR | EDIT_FORCE_BOT,
|
$updater->saveRevision(
|
||||||
false, // baseRevId
|
CommentStoreComment::newUnsavedComment(\wfMessage( 'linktitles-bot-comment', self::URL )),
|
||||||
$context->getUser()
|
EDIT_MINOR | EDIT_FORCE_BOT
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user