Revise Special class.

- Change: The $wgLinkTitlesBatchTimeLimit configuration variable was renamed to $wgLinkTitlesSpecialPageReloadAfter.
This commit is contained in:
Daniel Kraus
2017-08-27 23:06:43 +02:00
parent f1eae017b9
commit 2c0eb6839b
4 changed files with 35 additions and 29 deletions

View File

@ -84,13 +84,13 @@ class Extension {
* @returns bool True if the page exists, false if the page does not exist
*/
public static function processPage( \Title $title, \RequestContext $context ) {
$page = \WikiPage::factory($title);
$page = \WikiPage::factory( $title );
$content = $page->getContent();
if ( $content != null ) {
$text = $content->getContentHandler()->serializeContent($content);
$text = $content->getContentHandler()->serializeContent( $content );
$config = new Config();
$linker = new Linker( $config );
$newText = $linker->linkContent($title, $text);
$newText = $linker->linkContent( $title, $text );
if ( $text != $newText ) {
$content = $content->getContentHandler()->unserializeContent( $newText );
$page->doEditContent(