&$list: List object (defaults to NULL, change it to an object instance and return
false override the list derivative used)
+'FileDeleteComplete': When a file is deleted
+$file: reference to the deleted file
+$oldimage: in case of the deletion of an old image, the name of the old file
+$article: in case all revisions of the file are deleted a reference to the article
+ associated with the file.
+$user: user who performed the deletion
+$reason: reason
+
'FileUpload': When a file upload occurs
$file : Image object representing the file that was uploaded
+'FileUndeleteComplete': When a file is undeleted
+$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
+
'GetBlockedStatus': after loading blocking status of an user from the database
$user: user (object) being checked
string &$error: output: HTML error to show if upload canceled by returning false
'UploadComplete': Upon completion of a file upload
-$image: Image object representing the file that was uploaded
+$uploadForm: Upload form object. File can be accessed by $uploadForm->mLocalFile.
'userCan': To interrupt/advise the "user can do X to Y article" check.
If you want to display an error message, try getUserPermissionsErrors.
} elseif ( $reason == 'other' ) {
$reason = $this->DeleteReason;
}
+
+ $article = null;
if( $this->oldimage ) {
$status = $this->file->deleteOld( $this->oldimage, $reason );
if( $status->ok ) {
$article->doDeleteArticle( $reason );
}
}
+ if( $status->isGood() ) wfRunHooks('FileDeleteComplete', array(
+ &$this->file, &$this->oldimage, &$article, &$wgUser, &$reason));
+
if( !$status->isGood() )
$wgOut->addWikiText( $status->getWikiText( 'filedeleteerror-short', 'filedeleteerror-long' ) );
if( $status->ok ) {
$this->mFileVersions );
if( is_array($ok) ) {
+ if ( $ok[1] ) // Undeleted file count
+ wfRunHooks( 'FileUndeleteComplete', array(
+ $this->mTargetObj, $this->mFileVersions,
+ $wgUser, $this->mComment) );
+
$skin = $wgUser->getSkin();
$link = $skin->makeKnownLinkObj( $this->mTargetObj );
$wgOut->addHtml( wfMsgWikiHtml( 'undeletedpage', $link ) );