From 3a6fd361ce5d8c7d6b33b42cb2de02a3222ca994 Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Wed, 6 Jul 2011 00:24:59 +0000 Subject: [PATCH] (Follow-up r91414) Also take the page name in account when considering how much of page to put in auto-summary. Move limit from 200 bytes to 250 bytes - 5 left over just cause (+4 bytes for the $1 and $2). The other auto-summary still uses 200 as the limit (I suppose they don't want it too big or soemthing?). --- includes/WikiPage.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 8a823cde0e..58706ce6c7 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -2299,7 +2299,10 @@ class WikiPage extends Page { if ( is_object( $rt ) && ( !is_object( $ot ) || !$rt->equals( $ot ) || $ot->getFragment() != $rt->getFragment() ) ) { $truncatedtext = $wgContLang->truncate( str_replace( "\n", ' ', $newtext ), - max( 0, 200 - strlen( wfMsgForContent( 'autoredircomment' ) ) ) ); + max( 0, 250 + - strlen( wfMsgForContent( 'autoredircomment' ) ) + - strlen( $rt->getFullText() ) + ) ); return wfMsgForContent( 'autoredircomment', $rt->getFullText(), $truncatedtext ); } -- 2.20.1