if ( $RCShowChangedSize && !$allLogs ) {
$last = 0;
$first = count( $block ) - 1;
- # Some events (like logs) have an "empty" size, so we need to skip those...
- while ( $last < $first && $block[$last]->mAttribs['rc_new_len'] === null ) {
+ # Some events (like logs and category changes) have an "empty" size, so we need to skip those...
+ while ( $last < $first && (
+ $block[$last]->mAttribs['rc_new_len'] === null ||
+ # TODO kill the below check after March 2016 - https://phabricator.wikimedia.org/T126428
+ $block[$last]->mAttribs['rc_type'] == RC_CATEGORIZE
+ ) ) {
$last++;
}
- while ( $first > $last && $block[$first]->mAttribs['rc_old_len'] === null ) {
+ while ( $last < $first && (
+ $block[$first]->mAttribs['rc_old_len'] === null ||
+ # TODO kill the below check after March 2016 - https://phabricator.wikimedia.org/T126428
+ $block[$first]->mAttribs['rc_type'] == RC_CATEGORIZE
+ ) ) {
$first--;
}
# Get net change
'rc_ip' => self::checkIPAddress( $ip ),
'rc_patrolled' => 1, // Always patrolled, just like log entries
'rc_new' => 0, # obsolete
- 'rc_old_len' => 0,
- 'rc_new_len' => 0,
+ 'rc_old_len' => null,
+ 'rc_new_len' => null,
'rc_deleted' => $deleted,
'rc_logid' => 0,
'rc_log_type' => null,