From 22c392d03c1cfb2ae294cc67c481382995613f95 Mon Sep 17 00:00:00 2001 From: Erik Moeller Date: Thu, 14 Jul 2005 01:36:49 +0000 Subject: [PATCH] don't try to prefill edit summary when section=new (relevant only for preload=) --- includes/EditPage.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 5c047e9139..f73d5e2a1a 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -511,14 +511,14 @@ class EditPage { $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() ); -- 2.20.1