Simplified addition

This commit is contained in:
Yaron Koren 2009-08-14 17:21:55 +00:00
parent 1d15ce0f4c
commit 2b19883967
Notes: Yaron Koren 2009-08-14 17:21:55 +00:00

View file

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