Merge "Pass archived page id to ArticleUndelete hook."
This commit is contained in:
commit
4f08c6760d
1 changed files with 2 additions and 1 deletions
|
|
@ -550,6 +550,7 @@ class PageArchive {
|
||||||
|
|
||||||
$ret->seek( $rev_count - 1 ); // move to last
|
$ret->seek( $rev_count - 1 ); // move to last
|
||||||
$row = $ret->fetchObject(); // get newest archived rev
|
$row = $ret->fetchObject(); // get newest archived rev
|
||||||
|
$oldPageId = (int)$row->ar_page_id; // pass this to ArticleUndelete hook
|
||||||
$ret->seek( 0 ); // move back
|
$ret->seek( 0 ); // move back
|
||||||
|
|
||||||
// grab the content to check consistency with global state before restoring the page.
|
// grab the content to check consistency with global state before restoring the page.
|
||||||
|
|
@ -642,7 +643,7 @@ class PageArchive {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
wfRunHooks( 'ArticleUndelete', array( &$this->title, $created, $comment ) );
|
wfRunHooks( 'ArticleUndelete', array( &$this->title, $created, $comment, $oldPageId ) );
|
||||||
|
|
||||||
if ( $this->title->getNamespace() == NS_FILE ) {
|
if ( $this->title->getNamespace() == NS_FILE ) {
|
||||||
$update = new HTMLCacheUpdate( $this->title, 'imagelinks' );
|
$update = new HTMLCacheUpdate( $this->title, 'imagelinks' );
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue