"Bawolff" posted a comment on MediaWiki.r111350.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/111350#c31951

Commit summary for MediaWiki.r111350:

fix for bug30377 : add a new parameter to limit the number of characters when 
rendering the channel item <description>

Bawolff's comment:

Note however, the Language class provides a truncate method which can localize 
the  '...' message ( <code>$parser->getFunctionLang()->truncate( $str, $length 
);</code> ), which may be a better choice. OTOH that truncate method is more 
meant for byte limits, so would handle multibyte characters slightly 
differently, so I suppose mb_substr is ok if we want the length to be the 
number of "code points" so to speak.

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to