mirror of
https://github.com/diocloid/LinkTitles.git
synced 2025-07-13 09:49:31 +02:00
Use WikiPage::doQuickEditContent for speed up batch.
WikiPage::doEditContent was extremely slow, because it updated link tables etc. For batch processing, we now use WikiPage::doQuickEditContent, which is considerably faster.
This commit is contained in:
@ -324,10 +324,10 @@
|
|||||||
$content = $page->getContent();
|
$content = $page->getContent();
|
||||||
$article = Article::newFromWikiPage($page, $context);
|
$article = Article::newFromWikiPage($page, $context);
|
||||||
LinkTitles::parseContent($article, $content);
|
LinkTitles::parseContent($article, $content);
|
||||||
$page->doEditContent($content,
|
$page->doQuickEditContent($content,
|
||||||
|
$context->getUser(),
|
||||||
"Links to existing pages added by LinkTitles bot.",
|
"Links to existing pages added by LinkTitles bot.",
|
||||||
EDIT_MINOR | EDIT_FORCE_BOT,
|
true // minor modification
|
||||||
$context->getUser()
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +71,6 @@ class SpecialLinkTitles extends SpecialPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Processes wiki articles, starting at the page indicated by
|
/// Processes wiki articles, starting at the page indicated by
|
||||||
/// $startTitle. If $wgLinkTitlesTimeLimit is reached before all pages are
|
/// $startTitle. If $wgLinkTitlesTimeLimit is reached before all pages are
|
||||||
/// processed, returns the title of the next page that needs processing.
|
/// processed, returns the title of the next page that needs processing.
|
||||||
|
Reference in New Issue
Block a user