Manual:Hooks/AfterImportPage

From mediawiki.org
AfterImportPage
Available from version 1.17.0
When a page import is completed
Define function:
public static function onAfterImportPage( $title, $origTitle, $revCount, $sRevCount, $pageInfo ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"AfterImportPage": "MediaWiki\\Extension\\MyExtension\\Hooks::onAfterImportPage"
	}
}
Called from: File(s): import/WikiImporter.php
Interface: AfterImportPageHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:AfterImportPage extensions.


Details[edit]

  • $title: Title under which the revisions were imported
  • $origTitle: Title provided by the XML file
  • $revCount: Number of revisions in the XML file
  • $sRevCount: Number of sucessfully imported revisions
  • $pageInfo: associative array of page information