Page MenuHomePhabricator

Remove RC_MOVE and RC_MOVE_OVER_REDIRECT rc_types
Closed, ResolvedPublic

Description

RC_MOVE and RC_MOVE_OVER_REDIRECT are obsolete, since at least 2006.

see https://www.mediawiki.org/wiki/Special:Code/MediaWiki/12550

It should be safe now to remove checks / handling of these in recent changes (formatting and api) code.


Version: unspecified
Severity: minor

Details

Reference
bz63755

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:12 AM
bzimport set Reference to bz63755.
bzimport added a subscriber: Unknown Object (MLST).

It keeps spreading if we don't remove it. Just found it in RecentChange::parseFromRCType.

References in mediawiki-core:

includes/changes/ChangesList.php
435: if ( $rc->mAttribs['rc_type'] != RC_MOVE && $rc->mAttribs['rc_type'] != RC_MOVE_OVER_REDIRECT ) {

includes/changes/EnhancedChangesList.php
146: // @todo remove handling for RC_MOVE and RC_MOVE_OVER_REDIRECT (bug 63755)
147: if ( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) {
554: if ( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) {

includes/changes/OldChangesList.php
57: if ( $rc->mAttribs['rc_type'] == RC_MOVE || $rc->mAttribs['rc_type'] == RC_MOVE_OVER_REDIRECT ) {

includes/changes/RCCacheEntryFactory.php
101: if ( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) {
174: $logTypes = array( RC_LOG, RC_MOVE, RC_MOVE_OVER_REDIRECT );
209: $logTypes = array( RC_NEW, RC_LOG, RC_MOVE, RC_MOVE_OVER_REDIRECT );
233: $logTypes = array( RC_LOG, RC_MOVE, RC_MOVE_OVER_REDIRECT );

includes/changes/RecentChange.php
150: case RC_MOVE: obsolete
159: case RC_MOVE_OVER_REDIRECT:
obsolete

includes/Defines.php
180:define( 'RC_MOVE', 2 ); obsolete
182:define( 'RC_MOVE_OVER_REDIRECT', 4 );
obsolete

Of these, the following seem actually in runnable context (though hopefully never triggered):

  • ChangesList.php
  • EnhancedChangesList.php
  • OldChangesList.php

Change 137519 had a related patch set uploaded by devunt:
Remove obsoleted RC_MOVE and RC_MOVE_OVER_REDIRECT rc_types values

https://gerrit.wikimedia.org/r/137519

Change 137519 merged by jenkins-bot:
Remove obsolete RC_MOVE and RC_MOVE_OVER_REDIRECT rc types

https://gerrit.wikimedia.org/r/137519