|
@@ 489-497 (lines=9) @@
|
| 486 |
|
[ 'rev_id' => $page->page_latest ], |
| 487 |
|
__METHOD__ ); |
| 488 |
|
|
| 489 |
|
if ( $previousTimestamp === false ) { |
| 490 |
|
wfDebug( __METHOD__ . ": existing page refers to a page_latest that does not exist\n" ); |
| 491 |
|
|
| 492 |
|
$status = Status::newGood( 0 ); |
| 493 |
|
$status->warning( 'undeleterevision-missing' ); |
| 494 |
|
$dbw->endAtomic( __METHOD__ ); |
| 495 |
|
|
| 496 |
|
return $status; |
| 497 |
|
} |
| 498 |
|
} else { |
| 499 |
|
# Have to create a new article... |
| 500 |
|
$makepage = true; |
|
@@ 549-557 (lines=9) @@
|
| 546 |
|
); |
| 547 |
|
|
| 548 |
|
$rev_count = $result->numRows(); |
| 549 |
|
if ( !$rev_count ) { |
| 550 |
|
wfDebug( __METHOD__ . ": no revisions to restore\n" ); |
| 551 |
|
|
| 552 |
|
$status = Status::newGood( 0 ); |
| 553 |
|
$status->warning( "undelete-no-results" ); |
| 554 |
|
$dbw->endAtomic( __METHOD__ ); |
| 555 |
|
|
| 556 |
|
return $status; |
| 557 |
|
} |
| 558 |
|
|
| 559 |
|
// We use ar_id because there can be duplicate ar_rev_id even for the same |
| 560 |
|
// page. In this case, we may be able to restore the first one. |