From: Erik Moeller Date: Thu, 14 Jul 2005 01:36:49 +0000 (+0000) Subject: don't try to prefill edit summary when section=new (relevant only for preload=) X-Git-Tag: 1.5.0beta4~135 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=22c392d03c1cfb2ae294cc67c481382995613f95;p=lhc%2Fweb%2Fwiklou.git don't try to prefill edit summary when section=new (relevant only for preload=) --- 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() );