This will mean that EnhancedChangesList does not
do odd things.
Log changes also have this set to null
This also adds a tiny bit of cleanup for the past which
could be removed in a month or 2.
This will fix all current RC entries as well as new ones.
Once no old RC entires for CategoryMembership changes exist
we can kill the type check.
Bug: T126428
Change-Id: Ib19819373af70e10b0c750ffdb06156764b7fa3d
if ( $RCShowChangedSize && !$allLogs ) {
$last = 0;
$first = count( $block ) - 1;
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
+ ) ) {
- 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
$first--;
}
# Get net change
'rc_ip' => self::checkIPAddress( $ip ),
'rc_patrolled' => 1, // Always patrolled, just like log entries
'rc_new' => 0, # obsolete
'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,
'rc_deleted' => $deleted,
'rc_logid' => 0,
'rc_log_type' => null,