Merge "Change php extract() to explicit code"
[lhc/web/wiklou.git] / includes / page / PageArchive.php
index 05247ca..0ef038f 100644 (file)
@@ -255,7 +255,11 @@ class PageArchive {
                );
 
                if ( $row ) {
-                       return Revision::newFromArchiveRow( $row, [ 'title' => $this->title ] );
+                       return Revision::newFromArchiveRow(
+                               $row,
+                               [ 'title' => $this->title ],
+                               $this->title
+                       );
                }
 
                return null;
@@ -604,10 +608,12 @@ class PageArchive {
                        $oldPageId = (int)$latestRestorableRow->ar_page_id; // pass this to ArticleUndelete hook
 
                        // grab the content to check consistency with global state before restoring the page.
-                       $revision = Revision::newFromArchiveRow( $latestRestorableRow,
+                       $revision = Revision::newFromArchiveRow(
+                               $latestRestorableRow,
                                [
                                        'title' => $article->getTitle(), // used to derive default content model
-                               ]
+                               ],
+                               $article->getTitle()
                        );
                        $user = User::newFromName( $revision->getUserText( Revision::RAW ), false );
                        $content = $revision->getContent( Revision::RAW );
@@ -670,12 +676,15 @@ class PageArchive {
                                }
                                // Insert one revision at a time...maintaining deletion status
                                // unless we are specifically removing all restrictions...
-                               $revision = Revision::newFromArchiveRow( $row,
+                               $revision = Revision::newFromArchiveRow(
+                                       $row,
                                        [
                                                'page' => $pageId,
                                                'title' => $this->title,
                                                'deleted' => $unsuppress ? 0 : $row->ar_deleted
-                                       ] );
+                                       ],
+                                       $this->title
+                               );
 
                                // This will also copy the revision to ip_changes if it was an IP edit.
                                $revision->insertOn( $dbw );