MCR: rename $baseRevId paramter to match actual semantics.
authordaniel <daniel.kinzler@wikimedia.de>
Tue, 19 Jun 2018 14:09:01 +0000 (16:09 +0200)
committerGergő Tisza <gtisza@wikimedia.org>
Fri, 22 Jun 2018 11:57:59 +0000 (11:57 +0000)
commit731a113aac378f4a97e6719834659e310da60961
treebe73f26ac920c333e9e2c802f99f3d107dc8d3a9
parent284bc0b5eb1c0e47d7100d5604ab4d5180dcd8d5
MCR: rename $baseRevId paramter to match actual semantics.

The $baseRevId in WikiPage::doEditContent is used only to indicate what
revision an edit reverted to. It is not used to indicate the actual base
revision of an edit in any sense. Specifically, EditPage never sets it.

So, this change renames the parameter to $originalRevId to match $undidRevId.
It also renames PageUpdater::setBaseRevisionId to setOriginalRevisionId.
Further, this introduces a paramter to PageUpdater::hasEditConflict():

Before this change, PageUpdater::hasEditConflict() was based on the
revision set via PageUpdater::setBaseRevisionId(), assuming the semantics
of "base revision" used by EditPage. However, this is NOT how the $baseRevId
parameter in WikiPage works.

Bug: T197685
Change-Id: Ib78257d4d6ee7c4ec093d5706904c599b02c73e0
docs/hooks.txt
includes/Storage/PageUpdater.php
includes/page/Article.php
includes/page/WikiPage.php
tests/phpunit/includes/Storage/PageUpdaterTest.php