Index: includes/EditPage.php =================================================================== --- includes/EditPage.php (revision 31414) +++ includes/EditPage.php (working copy) @@ -531,9 +531,6 @@ $fname = 'EditPage::importFormData'; wfProfileIn( $fname ); - # Section edit can come from either the form or a link - $this->section = $request->getVal( 'wpSection', $request->getVal( 'section' ) ); - if( $request->wasPosted() ) { # These fields need to be checked for encoding. # Also remove trailing whitespace, but don't remove _initial_ @@ -617,12 +614,11 @@ $this->minoredit = false; $this->watchthis = false; $this->recreate = false; - - if ( $this->section == 'new' && $request->getVal( 'preloadtitle' ) ) { - $this->summary = $request->getVal( 'preloadtitle' ); - } } + # Section edit can come from either the form or a link + $this->section = $request->getVal( 'wpSection', $request->getVal( 'section' ) ); + $this->oldid = $request->getInt( 'oldid' ); $this->live = $request->getCheck( 'live' ); @@ -991,8 +987,14 @@ * Called on the first invocation, e.g. when a user clicks an edit link */ function initialiseForm() { + global $wgRequest; + $this->edittime = $this->mArticle->getTimestamp(); - $this->summary = ''; + if ($this->section == 'new') { + $this->summary = $wgRequest->getVal( 'preloadtitle', '' ); + } else { + $this->summary = ''; + } $this->textbox1 = $this->getContent(false); if ($this->textbox1 === false) return false;