Index: trunk/phase3/includes/specials/SpecialUndelete.php |
— | — | @@ -526,18 +526,21 @@ |
527 | 527 | return 0; |
528 | 528 | } |
529 | 529 | |
| 530 | + $created = (bool)$newid; |
| 531 | + |
530 | 532 | // Attach the latest revision to the page... |
531 | 533 | $wasnew = $article->updateIfNewerOn( $dbw, $revision, $previousRevId ); |
532 | | - if ( $newid || $wasnew ) { |
| 534 | + if ( $created || $wasnew ) { |
533 | 535 | // Update site stats, link tables, etc |
534 | | - $article->createUpdates( $revision ); |
| 536 | + $article->editUpdates( $revision->getText(), $revision->getComment(), |
| 537 | + $revision->isMinor(), wfTimestamp(), $revision->getId(), true, null, $created ); |
535 | 538 | } |
536 | 539 | |
537 | | - if( $newid ) { |
538 | | - wfRunHooks( 'ArticleUndelete', array( &$this->title, true, $comment ) ); |
| 540 | + wfRunHooks( 'ArticleUndelete', array( &$this->title, $created, $comment ) ); |
| 541 | + |
| 542 | + if( $created ) { |
539 | 543 | Article::onArticleCreate( $this->title ); |
540 | 544 | } else { |
541 | | - wfRunHooks( 'ArticleUndelete', array( &$this->title, false, $comment ) ); |
542 | 545 | Article::onArticleEdit( $this->title ); |
543 | 546 | } |
544 | 547 | |