From e940d95e196436afbf3201cda5e7176210fea311 Mon Sep 17 00:00:00 2001 From: Erik Moeller Date: Thu, 18 Mar 2004 15:02:56 +0000 Subject: [PATCH] don't prefill summary again during preview --- includes/EditPage.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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 ) { -- 2.20.1