Page MenuHomePhabricator

Can't force edits to be marked as bot for new pages for non-bot users
Closed, ResolvedPublic

Description

Author: dotcom

Description:
It is impossible to set the EDIT_FORCE_BOT flag for non-bot user edits in
Article::doEdit() for new articles because of a typo in RecentChange::notifyNew().

The conditional statement should be like the one in RecentChange::notifyEdit():
( $bot === 'default' ) instead of ( $bot == 'default' ), otherwise the statement
evaluates to true if the bot flag is already true, when the intention is for
that clause to be executed only if the flag has not been set at all.

This problem is present in the trunk, 1.10, 1.9.3, and probably earlier versions.

[Credit to Phlip for pinpointing the problem.]


Version: 1.10.x
Severity: normal
OS: Windows XP
Platform: PC

Details

Reference
bz9860

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:37 PM
bzimport set Reference to bz9860.
bzimport added a subscriber: Unknown Object (MLST).

dotcom wrote:

patch to fix bug 9860

This patch fixes the trunk, 1.10, 1.9.3, and probably earlier versions.

Attached:

ayg wrote:

Thanks for the patch! Fixed in r22058. (Non-critical fixes are not backported
to already-released versions.)