(bug 28649) use $wgContLang->truncate on log action comments to avoid half eaten unicode chars and also adds a nice '...'
Patch by Umherirrender.
This commit is contained in:
parent
119c570e28
commit
6857bb3df6
2 changed files with 7 additions and 0 deletions
|
|
@ -70,6 +70,8 @@ production.
|
|||
warnings/notices to be thrown.
|
||||
* (bug 30335) Fix for HTMLForms using GET breaking when non-friendly URLs are
|
||||
used
|
||||
* (bug 28649) Avoiding half truncated multi-byte unicode characters when
|
||||
truncating log comments.
|
||||
|
||||
=== API changes in 1.19 ===
|
||||
* (bug 19838) siprop=interwikimap can now use the interwiki cache.
|
||||
|
|
|
|||
|
|
@ -416,6 +416,8 @@ class LogPage {
|
|||
* @param $doer User object: the user doing the action
|
||||
*/
|
||||
public function addEntry( $action, $target, $comment, $params = array(), $doer = null ) {
|
||||
global $wgContLang;
|
||||
|
||||
if ( !is_array( $params ) ) {
|
||||
$params = array( $params );
|
||||
}
|
||||
|
|
@ -424,6 +426,9 @@ class LogPage {
|
|||
$comment = '';
|
||||
}
|
||||
|
||||
# Truncate for whole multibyte characters.
|
||||
$comment = $wgContLang->truncate( $comment, 255 );
|
||||
|
||||
$this->action = $action;
|
||||
$this->target = $target;
|
||||
$this->comment = $comment;
|
||||
|
|
|
|||
Loading…
Reference in a new issue