From: Jens Frank Date: Sun, 5 Dec 2004 23:16:35 +0000 (+0000) Subject: Bug 985 Fix auto-summary for section edits X-Git-Tag: 1.5.0alpha1~1145 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=8d35a677b2c277309a2684093181baf4b761ad44;p=lhc%2Fweb%2Fwiklou.git Bug 985 Fix auto-summary for section edits --- diff --git a/includes/EditPage.php b/includes/EditPage.php index e7ccb3415f..17c2bbf4ae 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -292,11 +292,11 @@ class EditPage { $s = wfMsg('editingsection', $this->mTitle->getPrefixedText() ); } if(!$this->preview) { - $sectitle=preg_match("/^=+(.*?)=+/mi", - $this->textbox1, - $matches); - if( !empty( $matches[1] ) ) { - $this->summary = "/* ". trim($matches[1])." */ "; + preg_match( "/^(=+)(.+)\\1/mi", + $this->textbox1, + $matches ); + if( !empty( $matches[2] ) ) { + $this->summary = "/* ". trim($matches[2])." */ "; } } } else {