r69293 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69292‎ | r69293 | r69294 >
Date:16:54, 12 July 2010
Author:roberthl
Status:ok
Tags:
Comment:
cleanupSpam.php:
- Replace calls to Article::updateArticle with equivilant calls to Article::doEdit. Resolves bug 18892.
Modified paths:
  • /trunk/phase3/maintenance/cleanupSpam.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/cleanupSpam.php
@@ -114,14 +114,12 @@
115115 // Didn't find a non-spammy revision, blank the page
116116 $this->output( "blanking\n" );
117117 $article = new Article( $title );
118 - $article->updateArticle( '', wfMsg( 'spam_blanking', $domain ),
119 - false, false );
120 -
 118+ $article->doEdit( '', wfMsg( 'spam_blanking', $domain ) );
121119 } else {
122120 // Revert to this revision
123121 $this->output( "reverting\n" );
124122 $article = new Article( $title );
125 - $article->updateArticle( $rev->getText(), wfMsg( 'spam_reverting', $domain ), false, false );
 123+ $article->doEdit( $rev->getText(), wfMsg( 'spam_reverting', $domain ), EDIT_UPDATE );
126124 }
127125 $dbw->commit();
128126 wfDoUpdates();

Status & tagging log