Last modified: 2009-09-30 19:12:52 UTC
When a user's post is edit conflicted, the edit summary is preserved in the new edit screen, but the checkboxes for "minor edit" and "watch this page" are not. Can those be kept as the user had selected them too?
Clarified summary; assigning to Trevor as part of editing screen cleanup.
I apologize if this is completely wrong, but would something as simple as this work? (Disclosure: completely new to this, just giving it a shot.) Index: EditPage.php =================================================================== --- EditPage.php (revision 57025) +++ EditPage.php (working copy) @@ -991,10 +991,10 @@ if ( $this->isConflict ) { wfDebug( "EditPage::editForm conflict! getting section ' $this->section' for time '$this->edittime' (article time '" . $this->mArticle->getTimestamp() . "')\n" ); - $text = $this->mArticle->replaceSection( $this->section, $this->textbox1, $this->summary, $this->edittime ); + $text = $this->mArticle->replaceSection( $this->section, $this->textbox1, $this->summary, $this->edittime, $this->minoredit, $this->watc hthis ); } else { wfDebug( "EditPage::editForm getting section '$this->sec tion'\n" ); - $text = $this->mArticle->replaceSection( $this->section, $this->textbox1, $this->summary ); + $text = $this->mArticle->replaceSection( $this->section, $this->textbox1, $this->summary, $this->minoredit, $this->watchthis ); } if ( is_null( $text ) ) { wfDebug( "EditPage::editForm activating conflict; sectio n replace failed.\n" );
Created attachment 6601 [details] Attempted fix.
(In reply to comment #3) > Created an attachment (id=6601) [details] > Attempted fix. > Please attach a patch instead of the complete EditPage.php file. (In reply to comment #2) > I apologize if this is completely wrong, but would something as simple as this > work? (Disclosure: completely new to this, just giving it a shot.) > You're passing extra parameters to Article::replaceSection(), so you'd need to modify that function to actually do something with them. Either way, replaceSection() is not the right place to do this, as it simply merges two sets of changes and returns the result. The return value (which is assigned to $text) is just plain text and has no way of storing complex stuff such as minor and watch toggles.
Seems to work when trying to emulate the problem.