show the first bit of the new redirect page.
Adds $2 to the autoredircomment (not used by default) that contains the first 150-ish characters of the newly created redirect page.
Meant so that the Wikipedian's can see their {{R from foo}} templates.
statistics (maintenance/language/transstat.php)
* (bug 29586) Make the (next 200) links on categories link directly to
the relevant section of the category.
+* (bug 29109) Allow the automatic edit summary for redirect creation
+ show the first bit of the new redirect page.
=== Bug fixes in 1.19 ===
* (bug 28868) Show total pages in the subtitle of an image on the
$rt = Title::newFromRedirect( $newtext );
if ( is_object( $rt ) && ( !is_object( $ot ) || !$rt->equals( $ot ) || $ot->getFragment() != $rt->getFragment() ) ) {
- return wfMsgForContent( 'autoredircomment', $rt->getFullText() );
+ $truncatedtext = $wgContLang->truncate(
+ str_replace( "\n", ' ', $newtext ),
+ max( 0, 200 - strlen( wfMsgForContent( 'autoredircomment' ) ) ) );
+ return wfMsgForContent( 'autoredircomment', $rt->getFullText(), $truncatedtext );
}
# New page autosummaries
# Auto-summaries
'autosumm-blank' => 'The auto summary when blanking the whole page. This is not the same as deleting the page.',
'autosumm-replace' => 'The auto summary when a user removes a lot of characters in the page.',
-'autoredircomment' => 'The auto summary when making a redirect. $1 is the page where it redirects to.',
+'autoredircomment' => 'The auto summary when making a redirect. $1 is the page where it redirects to. $2 is the first X number of characters of the redirect ($2 is usually only used when end users customize the message)',
'autosumm-new' => 'The auto summary when creating a new page. $1 are the first X number of characters of the new page.',
# Size units