'FileUpload': When a file upload occurs
$file : Image object representing the file that was uploaded
+$reupload : Boolean indicating if there was a previously another image there or not (since 1.17)
+$hasDescription : Boolean indicating that there was already a description page and a new one from the comment wasn't created (since 1.17)
'FileUndeleteComplete': When a file is undeleted
$title: title object to the file
$article->doEdit( $pageText, $comment, EDIT_NEW | EDIT_SUPPRESS_RC );
}
- # Hooks, hooks, the magic of hooks...
- wfRunHooks( 'FileUpload', array( $this ) );
-
# Commit the transaction now, in case something goes wrong later
# The most important thing is that files don't get lost, especially archives
$dbw->commit();
# which in fact doesn't really exist (bug 24978)
$this->saveToCache();
+ # Hooks, hooks, the magic of hooks...
+ wfRunHooks( 'FileUpload', array( $this, $reupload, $descTitle->exists() ) );
+
# Invalidate cache for all pages using this file
$update = new HTMLCacheUpdate( $this->getTitle(), 'imagelinks' );
$update->doUpdate();