}
# Actually store the edit
- $status = $this->doEdit( $target->getText(), $summary, $flags, $target->getId() );
+ $status = $this->doEdit( $target->getText(), $summary, $flags, $target->getId(), $guser );
if ( !empty( $status->value['revision'] ) ) {
$revId = $status->value['revision']->getId();
} else {
return;
}
+ $doer = User::newFromName( 'Maintenance script' );
+
foreach ( $titles as $t ) {
- $a = new Article( $t );
- $this->output( 'Processing ' . $t->getPrefixedText() . '...' );
- if ( !$a->commitRollback( $user, $summary, $bot, $results ) ) {
+ $page = WikiPage::factory( $t );
+ $this->output( 'Processing ' . $t->getPrefixedText() . '... ' );
+ if ( !$page->commitRollback( $user, $summary, $bot, $results, $doer ) ) {
$this->output( "done\n" );
} else {
$this->output( "failed\n" );