Index: trunk/phase3/maintenance/rollbackEdits.php |
— | — | @@ -62,10 +62,12 @@ |
63 | 63 | return; |
64 | 64 | } |
65 | 65 | |
| 66 | + $doer = User::newFromName( 'Maintenance script' ); |
| 67 | + |
66 | 68 | foreach ( $titles as $t ) { |
67 | | - $a = new Article( $t ); |
68 | | - $this->output( 'Processing ' . $t->getPrefixedText() . '...' ); |
69 | | - if ( !$a->commitRollback( $user, $summary, $bot, $results ) ) { |
| 69 | + $page = WikiPage::factory( $t ); |
| 70 | + $this->output( 'Processing ' . $t->getPrefixedText() . '... ' ); |
| 71 | + if ( !$page->commitRollback( $user, $summary, $bot, $results, $doer ) ) { |
70 | 72 | $this->output( "done\n" ); |
71 | 73 | } else { |
72 | 74 | $this->output( "failed\n" ); |
Index: trunk/phase3/includes/WikiPage.php |
— | — | @@ -2220,7 +2220,7 @@ |
2221 | 2221 | } |
2222 | 2222 | |
2223 | 2223 | # Actually store the edit |
2224 | | - $status = $this->doEdit( $target->getText(), $summary, $flags, $target->getId() ); |
| 2224 | + $status = $this->doEdit( $target->getText(), $summary, $flags, $target->getId(), $guser ); |
2225 | 2225 | if ( !empty( $status->value['revision'] ) ) { |
2226 | 2226 | $revId = $status->value['revision']->getId(); |
2227 | 2227 | } else { |