PageArchive: Pass correct overrides to newRevisionFromArchiveRow()
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 23 Jul 2018 12:44:02 +0000 (08:44 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 23 Jul 2018 12:44:02 +0000 (08:44 -0400)
Revision::newFromArchiveRow took 'page' as an override for ar_page_id,
while RevisionStore::newRevisionFromArchiveRow() needs 'page_id'.

Thanks to sanity checks elsewhere in RevisionStore, this mistaken
override causes an exception to be thrown rather than undeleted
revisions potentially pointing to the wrong page.

Bug: T200072
Change-Id: I9d7543866c674f4d8aea9ec00fcc15cbf616ca66

includes/page/PageArchive.php

index aa34dd2..dfc7c02 100644 (file)
@@ -767,7 +767,7 @@ class PageArchive {
                                        0,
                                        $this->title,
                                        [
-                                               'page' => $pageId,
+                                               'page_id' => $pageId,
                                                'deleted' => $unsuppress ? 0 : $row->ar_deleted
                                        ]
                                );