From 8d35a677b2c277309a2684093181baf4b761ad44 Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Sun, 5 Dec 2004 23:16:35 +0000 Subject: [PATCH] Bug 985 Fix auto-summary for section edits --- includes/EditPage.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 { -- 2.20.1