Manual:Hooks/AfterImportPage

Category:MediaWiki hooks#AfterImportPage Category:Hooks added in MediaWiki 1.17.0#AfterImportPage
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.phpCategory:MediaWiki hooks included in WikiImporter.php#AfterImportPage
Interface: AfterImportPageHook.php

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

Details

  • $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
Category:Hooks added in MediaWiki 1.17.0 Category:MediaWiki hooks Category:MediaWiki hooks included in WikiImporter.php