If the replacements are made by a bot, the edits are flagged as such from the job. Suggested by Nachteule http://www.mediawiki.org/wiki/Extension_talk:Replace_Text#respect_bot_flag

This commit is contained in:
Siebrand Mazeland 2009-08-13 16:56:36 +00:00
parent e669907824
commit b3d2de76e2
Notes: Siebrand Mazeland 2009-08-13 16:56:36 +00:00

View file

@ -64,7 +64,11 @@ class ReplaceTextJob extends Job {
$actual_user = $wgUser;
$wgUser = User::newFromId( $this->params['user_id'] );
$edit_summary = $this->params['edit_summary'];
$flags = EDIT_MINOR;
if ($wgUser->isAllowed('bot')) {
$flags = EDIT_MINOR | EDIT_FORCE_BOT;
} else {
$flags = EDIT_MINOR;
}
$article->doEdit( $new_text, $edit_summary, $flags );
$wgUser = $actual_user;
}