dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3a8e088
)
r110955: also truncate rc_comment for log entries. This adds the code in save() to...
author
Aaron Schulz
<aaron@users.mediawiki.org>
Tue, 6 Mar 2012 19:38:17 +0000
(19:38 +0000)
committer
Aaron Schulz
<aaron@users.mediawiki.org>
Tue, 6 Mar 2012 19:38:17 +0000
(19:38 +0000)
includes/RecentChange.php
patch
|
blob
|
history
diff --git
a/includes/RecentChange.php
b/includes/RecentChange.php
index
73c5299
..
1ce47e1
100644
(file)
--- a/
includes/RecentChange.php
+++ b/
includes/RecentChange.php
@@
-166,7
+166,7
@@
class RecentChange {
* @param $noudp bool
*/
public function save( $noudp = false ) {
* @param $noudp bool
*/
public function save( $noudp = false ) {
- global $wgLocalInterwiki, $wgPutIPinRC;
+ global $wgLocalInterwiki, $wgPutIPinRC
, $wgContLang
;
$dbw = wfGetDB( DB_MASTER );
if( !is_array($this->mExtra) ) {
$dbw = wfGetDB( DB_MASTER );
if( !is_array($this->mExtra) ) {
@@
-183,6
+183,9
@@
class RecentChange {
unset( $this->mAttribs['rc_ip'] );
}
unset( $this->mAttribs['rc_ip'] );
}
+ # Make sure summary is truncated (whole multibyte characters)
+ $this->mAttribs['rc_comment'] = $wgContLang->truncate( $this->mAttribs['rc_comment'], 255 );
+
# Fixup database timestamps
$this->mAttribs['rc_timestamp'] = $dbw->timestamp($this->mAttribs['rc_timestamp']);
$this->mAttribs['rc_cur_time'] = $dbw->timestamp($this->mAttribs['rc_cur_time']);
# Fixup database timestamps
$this->mAttribs['rc_timestamp'] = $dbw->timestamp($this->mAttribs['rc_timestamp']);
$this->mAttribs['rc_cur_time'] = $dbw->timestamp($this->mAttribs['rc_cur_time']);