// css / js subpages of user pages get a special treatment
$isCssJsSubpage = $wgTitle->isCssJsSubpage();
- # If we're creating a discussion page, use the standard comment
- # form.
- if(!$wgTitle->exists() && $wgTitle->isTalkPage()) {
- $this->section='new';
- }
-
if(!$this->mTitle->getArticleID()) { # new article
$editintro = $wgRequest->getText( 'editintro' );
$addstandardintro=true;
}
}
+ // Save errors may fall down to the edit form, but we've now
+ // merged the section into full text. Clear the section field
+ // so that later submission of conflict forms won't try to
+ // replace that into a duplicated mess.
+ $this->textbox1 = $text;
+ $this->section = '';
+
if (wfRunHooks('ArticleSave', array(&$this->mArticle, &$wgUser, &$text,
&$this->summary, &$this->minoredit,
&$this->watchthis, &$sectionanchor)))
$this->summary, $this->minoredit,
$this->watchthis, $sectionanchor));
return;
+ } else {
+ $isConflict = true;
}
- else
- $isConflict = true;
}
}
}
$s = wfMsg('editingcomment', $this->mTitle->getPrefixedText() );
} else {
$s = wfMsg('editingsection', $this->mTitle->getPrefixedText() );
- }
- if( !$this->preview && !$this->diff ) {
- preg_match( "/^(=+)(.+)\\1/mi",
- $this->textbox1,
- $matches );
- if( !empty( $matches[2] ) ) {
- $this->summary = "/* ". trim($matches[2])." */ ";
- }
+ if( !$this->preview && !$this->diff ) {
+ preg_match( "/^(=+)(.+)\\1/mi",
+ $this->textbox1,
+ $matches );
+ if( !empty( $matches[2] ) ) {
+ $this->summary = "/* ". trim($matches[2])." */ ";
+ }
+ }
}
} else {
$s = wfMsg( 'editing', $this->mTitle->getPrefixedText() );