Index: branches/wmf/1.18wmf1/includes/specials/SpecialUndelete.php |
— | — | @@ -399,6 +399,10 @@ |
400 | 400 | |
401 | 401 | # Does this page already exist? We'll have to update it... |
402 | 402 | $article = new Article( $this->title ); |
| 403 | + # Load latest data for the current page (bug 31179) |
| 404 | + $article->loadPageData( 'fromdbmaster' ); |
| 405 | + $oldcountable = $article->isCountable(); |
| 406 | + |
403 | 407 | $options = 'FOR UPDATE'; // lock page |
404 | 408 | $page = $dbw->selectRow( 'page', |
405 | 409 | array( 'page_id', 'page_latest' ), |
— | — | @@ -532,7 +536,6 @@ |
533 | 537 | } |
534 | 538 | |
535 | 539 | $created = (bool)$newid; |
536 | | - $oldcountable = $article->isCountable(); |
537 | 540 | |
538 | 541 | // Attach the latest revision to the page... |
539 | 542 | $wasnew = $article->updateIfNewerOn( $dbw, $revision, $previousRevId ); |