From: Brian Wolff Date: Wed, 6 Jul 2011 00:24:59 +0000 (+0000) Subject: (Follow-up r91414) Also take the page name in account when considering how much of... X-Git-Tag: 1.31.0-rc.0~29052 X-Git-Url: http://git.cyclocoop.org/data/%24oldEdit?a=commitdiff_plain;h=3a6fd361ce5d8c7d6b33b42cb2de02a3222ca994;p=lhc%2Fweb%2Fwiklou.git (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?). --- 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 ); }