Manual:Hooks/FileUndeleteComplete

From MediaWiki.org
Jump to: navigation, search
FileUndeleteComplete
Available from version 1.13.0
When a file is undeleted

Define function:
public static function onFileUndeleteComplete( $file, $fileVersions, $user, $reason ) { ... }

Attach hook:
$wgHooks['FileUndeleteComplete'][] = 'MyExtensionHooks::onFileUndeleteComplete';
Called from: SpecialUndelete.php

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


[edit] Details

  • $title: title object to the file
  • $fileVersions: array of undeleted versions. Empty if all versions were restored
  • $user: user who performed the undeletion
  • $reason: reason
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox