wfRunHooks( 'ArticleUndelete', array( &$this->title, false ) );
Article::onArticleEdit( $this->title );
}
+
+ if( $this->title->getNamespace() == NS_IMAGE ) {
+ $update = new HTMLCacheUpdate( $this->title, 'imagelinks' );
+ $update->doUpdate();
+ }
} else {
// Revision couldn't be created. This is very weird
return self::UNDELETE_UNKNOWNERR;
function showSearchForm() {
global $wgOut, $wgScript;
- $wgOut->addWikiText( wfMsg( 'undelete-header' ) );
+ $wgOut->addWikiMsg( 'undelete-header' );
$wgOut->addHtml(
Xml::openElement( 'form', array(
global $wgLang, $wgContLang, $wgUser, $wgOut;
if( $result->numRows() == 0 ) {
- $wgOut->addWikiText( wfMsg( 'undelete-no-results' ) );
+ $wgOut->addWikiMsg( 'undelete-no-results' );
return;
}
- $wgOut->addWikiText( wfMsg( "undeletepagetext" ) );
+ $wgOut->addWikiMsg( "undeletepagetext" );
$sk = $wgUser->getSkin();
$undelete = SpecialPage::getTitleFor( 'Undelete' );
$rev = $archive->getRevision( $timestamp );
if( !$rev ) {
- $wgOut->addWikiTexT( wfMsg( 'undeleterevision-missing' ) );
+ $wgOut->addWikiMsg( 'undeleterevision-missing' );
return;
}
/*
$text = $archive->getLastRevisionText();
if( is_null( $text ) ) {
- $wgOut->addWikiText( wfMsg( "nohistory" ) );
+ $wgOut->addWikiMsg( "nohistory" );
return;
}
*/
if ( $this->mAllowed ) {
- $wgOut->addWikiText( wfMsg( "undeletehistory" ) );
+ $wgOut->addWikiMsg( "undeletehistory" );
} else {
- $wgOut->addWikiText( wfMsg( "undeletehistorynoadmin" ) );
+ $wgOut->addWikiMsg( "undeletehistorynoadmin" );
}
# List all stored revisions
$revisions->free();
$wgOut->addHTML("</ul>");
} else {
- $wgOut->addWikiText( wfMsg( "nohistory" ) );
+ $wgOut->addWikiMsg( "nohistory" );
}
if( $haveFiles ) {
$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 ) );