diff options
-rw-r--r-- | RELEASE-NOTES-1.19 | 4 | ||||
-rw-r--r-- | includes/Revision.php | 10 | ||||
-rw-r--r-- | includes/WikiPage.php | 6 | ||||
-rw-r--r-- | includes/api/ApiPurge.php | 3 |
4 files changed, 20 insertions, 3 deletions
diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 1e6ddb775877..3e109d960b90 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -230,6 +230,8 @@ production. * (bug 4438) Add CSS hook for current WikiPage action. * (bug 33703) Common border-bottom color for <abbr> should inherit default (text) color. * (bug 33819) Display file sizes in appropriate units. +* (bug 32948) {{REVISIONID}} and related variables are no longer blank after doing + a null edit. === API changes in 1.19 === * Made action=edit less likely to return "unknownerror", by returning the actual error @@ -262,6 +264,8 @@ production. * (bug 33147) API examples should explain what they do. * (bug 33482) Api incorrectly calls ApiBase::parseMultiValue if allowed values is given as an array. +* (bug 32948) {{REVISIONID}} and related variables are no longer blank after + calling action=purge&forcelinkupdate. === Languages updated in 1.19 === diff --git a/includes/Revision.php b/includes/Revision.php index e14471e21fba..ba28999d6b24 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -475,6 +475,16 @@ class Revision { } /** + * Set the revision ID + * + * @since 1.19 + * @param $id Integer + */ + public function setId( $id ) { + $this->mId = $id; + } + + /** * Get text row ID * * @return Integer diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 039547196c69..8d5d60646d4e 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -1348,6 +1348,10 @@ class WikiPage extends Page { $user->incEditCount(); $dbw->commit(); } + } else { + // Bug 32948: revision ID must be set to page {{REVISIONID}} and + // related variables correctly + $revision->setId( $this->getLatest() ); } if ( !$wgDBtransactions ) { @@ -1367,8 +1371,6 @@ class WikiPage extends Page { if ( !$changed ) { $status->warning( 'edit-no-change' ); $revision = null; - // Keep the same revision ID, but do some updates on it - $revisionId = $this->getLatest(); // Update page_touched, this is usually implicit in the page update // Other cache updates are done in onArticleEdit() $this->mTitle->invalidateCache(); diff --git a/includes/api/ApiPurge.php b/includes/api/ApiPurge.php index dfa7229e960b..9e9320fb6c22 100644 --- a/includes/api/ApiPurge.php +++ b/includes/api/ApiPurge.php @@ -89,7 +89,8 @@ class ApiPurge extends ApiBase { global $wgParser, $wgEnableParserCache; $popts = ParserOptions::newFromContext( $this->getContext() ); - $p_result = $wgParser->parse( $page->getRawText(), $title, $popts ); + $p_result = $wgParser->parse( $page->getRawText(), $title, $popts, + true, true, $page->getLatest() ); # Update the links tables $u = new LinksUpdate( $title, $p_result ); |