r91508 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91507‎ | r91508 | r91509 >
Date:00:24, 6 July 2011
Author:bawolff
Status:ok
Tags:
Comment:
(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?).
Modified paths:
  • /trunk/phase3/includes/WikiPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/WikiPage.php
@@ -2299,7 +2299,10 @@
23002300 if ( is_object( $rt ) && ( !is_object( $ot ) || !$rt->equals( $ot ) || $ot->getFragment() != $rt->getFragment() ) ) {
23012301 $truncatedtext = $wgContLang->truncate(
23022302 str_replace( "\n", ' ', $newtext ),
2303 - max( 0, 200 - strlen( wfMsgForContent( 'autoredircomment' ) ) ) );
 2303+ max( 0, 250
 2304+ - strlen( wfMsgForContent( 'autoredircomment' ) )
 2305+ - strlen( $rt->getFullText() )
 2306+ ) );
23042307 return wfMsgForContent( 'autoredircomment', $rt->getFullText(), $truncatedtext );
23052308 }
23062309

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r91414(bug 29109) Allow the automatic edit summary for redirect creation...bawolff17:03, 4 July 2011

Status & tagging log