From: Erik Moeller Date: Thu, 18 Mar 2004 15:02:56 +0000 (+0000) Subject: don't prefill summary again during preview X-Git-Tag: 1.3.0beta1~775 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=e940d95e196436afbf3201cda5e7176210fea311;p=lhc%2Fweb%2Fwiklou.git don't prefill summary again during preview --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 73c228248b..a56841950e 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -151,7 +151,7 @@ class EditPage { $this->mArticle->insertNewArticle( $this->textbox1, $this->summary, $this->minoredit, $this->watchthis ); return; } - + # Article exists. Check for edit conflict. $this->mArticle->clear(); # Force reload of dates, etc. @@ -221,10 +221,12 @@ class EditPage { } else { $s.=wfMsg("sectionedit"); } - $sectitle=preg_match("/^=+(.*?)=+/mi", - $this->textbox1, - $matches); - if($matches[1]) { $this->summary = " (".trim($matches[1]).")"; } + if(!$this->preview) { + $sectitle=preg_match("/^=+(.*?)=+/mi", + $this->textbox1, + $matches); + if($matches[1]) { $this->summary = "(".trim($matches[1]).")"; } + } } $wgOut->setPageTitle( $s ); if ( $this->oldid ) {