*
* @see Content::prepareSave
*/
- public function prepareSave( WikiPage $page, $flags, $baseRevId, User $user ) {
+ public function prepareSave( WikiPage $page, $flags, $parentRevId, User $user ) {
if ( $this->isValid() ) {
return Status::newGood();
} else {
*
* @param WikiPage $page The page to be saved.
* @param int $flags Bitfield for use with EDIT_XXX constants, see WikiPage::doEditContent()
- * @param int $baseRevId The ID of the current revision
+ * @param int $parentRevId The ID of the current revision
* @param User $user
*
* @return Status A status object indicating whether the content was
*
* @see WikiPage::doEditContent()
*/
- public function prepareSave( WikiPage $page, $flags, $baseRevId, User $user );
+ public function prepareSave( WikiPage $page, $flags, $parentRevId, User $user );
/**
* Returns a list of updates to perform when this content is deleted.
* error will be returned. These two conditions are also possible with
* auto-detection due to MediaWiki's performance-optimised locking strategy.
*
- * @param bool|int $baseRevId The revision ID this edit was based off, if any
+ * @param bool|int $baseRevId The revision ID this edit was based off, if any.
+ * This is not the parent revision ID, rather the revision ID for older
+ * content used as the source for a rollback, for example.
* @param User $user The user doing the edit
*
* @throws MWException
* error will be returned. These two conditions are also possible with
* auto-detection due to MediaWiki's performance-optimised locking strategy.
*
- * @param bool|int $baseRevId The revision ID this edit was based off, if any
+ * @param bool|int $baseRevId The revision ID this edit was based off, if any.
+ * This is not the parent revision ID, rather the revision ID for older
+ * content used as the source for a rollback, for example.
* @param User $user The user doing the edit
* @param string $serialFormat Format for storing the content in the
* database.
$dbw->begin( __METHOD__ );
try {
- $prepStatus = $content->prepareSave( $this, $flags, $baseRevId, $user );
+ $prepStatus = $content->prepareSave( $this, $flags, $oldid, $user );
$status->merge( $prepStatus );
if ( !$status->isOK() ) {
$dbw->begin( __METHOD__ );
try {
- $prepStatus = $content->prepareSave( $this, $flags, $baseRevId, $user );
+ $prepStatus = $content->prepareSave( $this, $flags, $oldid, $user );
$status->merge( $prepStatus );
if ( !$status->isOK() ) {