(Follow-up r91414) Also take the page name in account when considering how much of...
authorBrian Wolff <bawolff@users.mediawiki.org>
Wed, 6 Jul 2011 00:24:59 +0000 (00:24 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Wed, 6 Jul 2011 00:24:59 +0000 (00:24 +0000)
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

index 8a823cd..58706ce 100644 (file)
@@ -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 );
                }