mirror of
				https://github.com/diocloid/LinkTitles.git
				synced 2025-10-22 05:42:32 +02:00 
			
		
		
		
	Merge pull request #64 from neayi/fix-60-doeditcontent-is-deprecated
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 );
 | 
			
		||||
			if ( $result ) {
 | 
			
		||||
				$content = $source->getContent()->getContentHandler()->unserializeContent( $result );
 | 
			
		||||
				$source->getPage()->doEditContent(
 | 
			
		||||
					$content,
 | 
			
		||||
					\wfMessage( 'linktitles-bot-comment', self::URL ),
 | 
			
		||||
					EDIT_MINOR | EDIT_FORCE_BOT,
 | 
			
		||||
					false, // baseRevId
 | 
			
		||||
					$context->getUser()
 | 
			
		||||
 | 
			
		||||
				$updater = $source->getPage()->newPageUpdater( $context->getUser());
 | 
			
		||||
				$updater->setContent( SlotRecord::MAIN, $content );
 | 
			
		||||
				$updater->saveRevision(
 | 
			
		||||
					CommentStoreComment::newUnsavedComment(\wfMessage( 'linktitles-bot-comment', self::URL )),
 | 
			
		||||
					EDIT_MINOR | EDIT_FORCE_BOT
 | 
			
		||||
				);
 | 
			
		||||
			};
 | 
			
		||||
			return true;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user