cleanupSpam.php:

- Replace calls to Article::updateArticle with equivilant calls to Article::doEdit.  Resolves bug 18892.
This commit is contained in:
Robert Leverington 2010-07-12 16:54:25 +00:00
parent dd76bb00c8
commit 8090c1c852

View file

@ -114,14 +114,12 @@ class CleanupSpam extends Maintenance {
// Didn't find a non-spammy revision, blank the page
$this->output( "blanking\n" );
$article = new Article( $title );
$article->updateArticle( '', wfMsg( 'spam_blanking', $domain ),
false, false );
$article->doEdit( '', wfMsg( 'spam_blanking', $domain ) );
} else {
// Revert to this revision
$this->output( "reverting\n" );
$article = new Article( $title );
$article->updateArticle( $rev->getText(), wfMsg( 'spam_reverting', $domain ), false, false );
$article->doEdit( $rev->getText(), wfMsg( 'spam_reverting', $domain ), EDIT_UPDATE );
}
$dbw->commit();
wfDoUpdates();