From: Aryeh Gregor Date: Fri, 22 Dec 2006 19:58:25 +0000 (+0000) Subject: (bug 8304) Line breaks in "new page" autosummaries should be converted to spaces. X-Git-Tag: 1.31.0-rc.0~54812 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=bcac48de50c818c8bc75b8f7c6d41b31e82f0b06;p=lhc%2Fweb%2Fwiklou.git (bug 8304) Line breaks in "new page" autosummaries should be converted to spaces. --- diff --git a/includes/Article.php b/includes/Article.php index 7332064d99..ebcb048978 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -2771,8 +2771,10 @@ class Article { if ($flags & EDIT_NEW && strlen($newtext)) { #If they're making a new article, give its text, truncated, in the summary. global $wgContLang; - $truncatedtext = $wgContLang->truncate( $newtext, max( 0, 200 - - strlen( wfMsgForContent( 'autosumm-new') ) ), '...' ); + $truncatedtext = $wgContLang->truncate( + str_replace("\n", ' ', $newtext), + max( 0, 200 - strlen( wfMsgForContent( 'autosumm-new') ) ), + '...' ); $summary = wfMsgForContent( 'autosumm-new', $truncatedtext ); }