r56441 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56440‎ | r56441 | r56442 >
Date:20:43, 16 September 2009
Author:ialex
Status:ok (Comments)
Tags:todo 
Comment:
* (bug 20517) Cancel link from edit page now returns to the old version when editing an old version
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -1196,6 +1196,8 @@
11971197 # Enabled article-related sidebar, toplinks, etc.
11981198 $wgOut->setArticleRelated( true );
11991199
 1200+ $cancelParams = array();
 1201+
12001202 if ( $this->isConflict ) {
12011203 $wgOut->wrapWikiMsg( "<div class='mw-explainconflict'>\n$1</div>", 'explainconflict' );
12021204
@@ -1246,6 +1248,7 @@
12471249
12481250 if ( !$this->mArticle->mRevision->isCurrent() ) {
12491251 $this->mArticle->setOldSubtitle( $this->mArticle->mRevision->getId() );
 1252+ $cancelParams['oldid'] = $this->mArticle->mRevision->getId();
12501253 $wgOut->addWikiMsg( 'editingold' );
12511254 }
12521255 }
@@ -1325,7 +1328,7 @@
13261329 $wgTitle,
13271330 wfMsgExt( 'cancel', array( 'parseinline' ) ),
13281331 array( 'id' => 'mw-editform-cancel' ),
1329 - array(),
 1332+ $cancelParams,
13301333 array( 'known', 'noclasses' )
13311334 );
13321335 $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
Index: trunk/phase3/RELEASE-NOTES
@@ -502,6 +502,8 @@
503503 * (bug 18180) Special:Export ignores limit, dir, offset parameters
504504 * User::getBlockedStatus() works for all kinds of user objects and doesn't
505505 assume the user object is equal to the current-user object ($wgUser)
 506+* (bug 20517) Cancel link from edit page now returns to the old version when
 507+ editing an old version
506508
507509 == API changes in 1.16 ==
508510

Follow-up revisions

RevisionCommit summaryAuthorDate
r62027Follow-up r56441: the cancel link now links to the correct version even on pr...ialex15:01, 5 February 2010

Comments

#Comment by Brion VIBBER (talk | contribs)   21:53, 29 September 2009

Only a partial fix; doesn't come into effect on previews etc. Reopened bug.

Status & tagging log