Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -1344,6 +1344,8 @@ |
1345 | 1345 | $autosumm = $this->autoSumm ? $this->autoSumm : md5( $this->summary ); |
1346 | 1346 | $wgOut->addHTML( Xml::hidden( 'wpAutoSummary', $autosumm ) ); |
1347 | 1347 | |
| 1348 | + $wgOut->addHTML( Xml::hidden( 'oldid', $this->mArticle->getOldID() ) ); |
| 1349 | + |
1348 | 1350 | if ( $this->section == 'new' ) { |
1349 | 1351 | $this->showSummaryInput( true, $this->summary ); |
1350 | 1352 | $wgOut->addHTML( $this->getSummaryPreview( true, $this->summary ) ); |
— | — | @@ -2445,11 +2447,12 @@ |
2446 | 2448 | |
2447 | 2449 | public function getCancelLink() { |
2448 | 2450 | global $wgUser, $wgTitle; |
| 2451 | + |
2449 | 2452 | $cancelParams = array(); |
2450 | | - if ( !$this->isConflict && isset( $this->mArticle ) && |
2451 | | - isset( $this->mArticle->mRevision ) && |
2452 | | - !$this->mArticle->mRevision->isCurrent() ) |
2453 | | - $cancelParams['oldid'] = $this->mArticle->mRevision->getId(); |
| 2453 | + if ( !$this->isConflict && $this->mArticle->getOldID() > 0 ) { |
| 2454 | + $cancelParams['oldid'] = $this->mArticle->getOldID(); |
| 2455 | + } |
| 2456 | + |
2454 | 2457 | return $wgUser->getSkin()->link( |
2455 | 2458 | $wgTitle, |
2456 | 2459 | wfMsgExt( 'cancel', array( 'parseinline' ) ), |