Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -230,6 +230,8 @@ |
231 | 231 | * (bug 4438) Add CSS hook for current WikiPage action. |
232 | 232 | * (bug 33703) Common border-bottom color for <abbr> should inherit default (text) color. |
233 | 233 | * (bug 33819) Display file sizes in appropriate units. |
| 234 | +* (bug 32948) {{REVISIONID}} and related variables are no longer blank after doing |
| 235 | + a null edit. |
234 | 236 | |
235 | 237 | === API changes in 1.19 === |
236 | 238 | * Made action=edit less likely to return "unknownerror", by returning the actual error |
— | — | @@ -262,6 +264,8 @@ |
263 | 265 | * (bug 33147) API examples should explain what they do. |
264 | 266 | * (bug 33482) Api incorrectly calls ApiBase::parseMultiValue if allowed |
265 | 267 | values is given as an array. |
| 268 | +* (bug 32948) {{REVISIONID}} and related variables are no longer blank after |
| 269 | + calling action=purge&forcelinkupdate. |
266 | 270 | |
267 | 271 | === Languages updated in 1.19 === |
268 | 272 | |
Index: trunk/phase3/includes/api/ApiPurge.php |
— | — | @@ -89,7 +89,8 @@ |
90 | 90 | global $wgParser, $wgEnableParserCache; |
91 | 91 | |
92 | 92 | $popts = ParserOptions::newFromContext( $this->getContext() ); |
93 | | - $p_result = $wgParser->parse( $page->getRawText(), $title, $popts ); |
| 93 | + $p_result = $wgParser->parse( $page->getRawText(), $title, $popts, |
| 94 | + true, true, $page->getLatest() ); |
94 | 95 | |
95 | 96 | # Update the links tables |
96 | 97 | $u = new LinksUpdate( $title, $p_result ); |
Index: trunk/phase3/includes/Revision.php |
— | — | @@ -475,6 +475,16 @@ |
476 | 476 | } |
477 | 477 | |
478 | 478 | /** |
| 479 | + * Set the revision ID |
| 480 | + * |
| 481 | + * @since 1.19 |
| 482 | + * @param $id Integer |
| 483 | + */ |
| 484 | + public function setId( $id ) { |
| 485 | + $this->mId = $id; |
| 486 | + } |
| 487 | + |
| 488 | + /** |
479 | 489 | * Get text row ID |
480 | 490 | * |
481 | 491 | * @return Integer |
Index: trunk/phase3/includes/WikiPage.php |
— | — | @@ -1348,6 +1348,10 @@ |
1349 | 1349 | $user->incEditCount(); |
1350 | 1350 | $dbw->commit(); |
1351 | 1351 | } |
| 1352 | + } else { |
| 1353 | + // Bug 32948: revision ID must be set to page {{REVISIONID}} and |
| 1354 | + // related variables correctly |
| 1355 | + $revision->setId( $this->getLatest() ); |
1352 | 1356 | } |
1353 | 1357 | |
1354 | 1358 | if ( !$wgDBtransactions ) { |
— | — | @@ -1367,8 +1371,6 @@ |
1368 | 1372 | if ( !$changed ) { |
1369 | 1373 | $status->warning( 'edit-no-change' ); |
1370 | 1374 | $revision = null; |
1371 | | - // Keep the same revision ID, but do some updates on it |
1372 | | - $revisionId = $this->getLatest(); |
1373 | 1375 | // Update page_touched, this is usually implicit in the page update |
1374 | 1376 | // Other cache updates are done in onArticleEdit() |
1375 | 1377 | $this->mTitle->invalidateCache(); |