mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ReplaceText
synced 2024-11-15 10:59:28 +00:00
Simplified addition
This commit is contained in:
parent
1d15ce0f4c
commit
2b19883967
Notes:
Yaron Koren
2009-08-14 17:21:55 +00:00
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue