Manual:Hooks/AfterImportPage

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
AfterImportPage
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
When a page import is completed
<translate> Define function:</translate>
public static function onAfterImportPage( $title, $origTitle, $revCount, $sRevCount, $pageInfo ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"AfterImportPage": "MediaWiki\\Extension\\MyExtension\\Hooks::onAfterImportPage"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> import/WikiImporter.php
<translate> Interface:</translate> AfterImportPageHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:AfterImportPage extensions</tvar>.</translate>


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