$title: Title corresponding to the article restored
$create: Whether or not the restoration caused the page to be created
(i.e. it didn't exist before)
+$comment: The comment associated with the undeletion.
'ArticleUpdateBeforeRedirect': After a page is updated (usually on save),
before the user is redirected back to the page
}
if( $restoreText ) {
- $textRestored = $this->undeleteRevisions( $timestamps, $unsuppress );
+ $textRestored = $this->undeleteRevisions( $timestamps, $unsuppress, $comment );
if($textRestored === false) // It must be one of UNDELETE_*
return false;
} else {
*
* @return mixed number of revisions restored or false on failure
*/
- private function undeleteRevisions( $timestamps, $unsuppress = false ) {
+ private function undeleteRevisions( $timestamps, $unsuppress = false, $comment = '' ) {
if ( wfReadOnly() )
return false;
$restoreAll = empty( $timestamps );
}
if( $newid ) {
- wfRunHooks( 'ArticleUndelete', array( &$this->title, true ) );
+ wfRunHooks( 'ArticleUndelete', array( &$this->title, true, $comment ) );
Article::onArticleCreate( $this->title );
} else {
- wfRunHooks( 'ArticleUndelete', array( &$this->title, false ) );
+ wfRunHooks( 'ArticleUndelete', array( &$this->title, false, $comment ) );
Article::onArticleEdit( $this->title );
}