This avoids the use of $wgUser in Revision constructor and makes the
dependency on the global visible.
Change-Id: Ief79c9769d28a1adb16abab8da1ec01984d9ef92
$redirectRevision = new Revision( array(
'title' => $this, // for determining the default content model
'page' => $newid,
+ 'user_text' => $wgUser->getName(),
+ 'user' => $wgUser->getId(),
'comment' => $comment,
'content' => $redirectContent ) );
$redirectRevision->insertOn( $dbw );
$revision = new Revision( array(
'title' => $this->getTitle(), // for determining the default content model
'page' => $this->getId(),
+ 'user_text' => $user->getName(),
+ 'user' => $user->getId(),
'text' => $serialized,
'length' => $content->getSize(),
'comment' => $comment,