Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -70,6 +70,8 @@ |
71 | 71 | warnings/notices to be thrown. |
72 | 72 | * (bug 30335) Fix for HTMLForms using GET breaking when non-friendly URLs are |
73 | 73 | used |
| 74 | +* (bug 28649) Avoiding half truncated multi-byte unicode characters when |
| 75 | + truncating log comments. |
74 | 76 | |
75 | 77 | === API changes in 1.19 === |
76 | 78 | * (bug 19838) siprop=interwikimap can now use the interwiki cache. |
Index: trunk/phase3/includes/LogPage.php |
— | — | @@ -416,6 +416,8 @@ |
417 | 417 | * @param $doer User object: the user doing the action |
418 | 418 | */ |
419 | 419 | public function addEntry( $action, $target, $comment, $params = array(), $doer = null ) { |
| 420 | + global $wgContLang; |
| 421 | + |
420 | 422 | if ( !is_array( $params ) ) { |
421 | 423 | $params = array( $params ); |
422 | 424 | } |
— | — | @@ -424,6 +426,9 @@ |
425 | 427 | $comment = ''; |
426 | 428 | } |
427 | 429 | |
| 430 | + # Truncate for whole multibyte characters. |
| 431 | + $comment = $wgContLang->truncate( $comment, 255 ); |
| 432 | + |
428 | 433 | $this->action = $action; |
429 | 434 | $this->target = $target; |
430 | 435 | $this->comment = $comment; |