Remove obsolete RC_MOVE and RC_MOVE_OVER_REDIRECT rc types
authorJuneHyeon Bae <devunt@gmail.com>
Thu, 5 Jun 2014 00:54:02 +0000 (09:54 +0900)
committerKrinkle <krinklemail@gmail.com>
Wed, 11 Jun 2014 02:44:48 +0000 (02:44 +0000)
RC_MOVE and RC_MOVE_OVER_REDIRECT are obsolete, since at least 2006.
So it is considered safe to remove.

Bug: 63755
Change-Id: I0f17c4d164585a48fb9f0d40b90a7d3b975c7ab8

RELEASE-NOTES-1.24
includes/Defines.php
includes/changes/ChangesList.php
includes/changes/EnhancedChangesList.php
includes/changes/OldChangesList.php
includes/changes/RCCacheEntryFactory.php
includes/changes/RecentChange.php

index b15ef6d..deeb6b8 100644 (file)
@@ -135,6 +135,8 @@ changes to languages because of Bugzilla reports.
 * (bug 63891) Add 'X-Robots-Tag: noindex' header in action=render pages.
 * SpecialPage no longer supports the syntax for invoking wfSpecial*() functions.
   All special pages should subclass SpecialPage and implement the execute() method.
+* (bug 63755) The deprecated constants RC_MOVE and RC_MOVE_OVER_REDIRECT were
+  removed.
 
 ==== Renamed classes ====
 * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression
index 19801ec..ce4ede3 100644 (file)
@@ -177,9 +177,7 @@ define( 'MW_DATE_ISO', 'ISO 8601' );
  */
 define( 'RC_EDIT', 0 );
 define( 'RC_NEW', 1 );
-define( 'RC_MOVE', 2 ); // obsolete
 define( 'RC_LOG', 3 );
-define( 'RC_MOVE_OVER_REDIRECT', 4 ); // obsolete
 define( 'RC_EXTERNAL', 5 );
 /**@}*/
 
index 246f95d..cd43f82 100644 (file)
@@ -432,13 +432,11 @@ class ChangesList extends ContextSource {
         * @return string
         */
        public function insertComment( $rc ) {
-               if ( $rc->mAttribs['rc_type'] != RC_MOVE && $rc->mAttribs['rc_type'] != RC_MOVE_OVER_REDIRECT ) {
-                       if ( $this->isDeleted( $rc, Revision::DELETED_COMMENT ) ) {
-                               return ' <span class="history-deleted">' .
-                                       $this->msg( 'rev-deleted-comment' )->escaped() . '</span>';
-                       } else {
-                               return Linker::commentBlock( $rc->mAttribs['rc_comment'], $rc->getTitle() );
-                       }
+               if ( $this->isDeleted( $rc, Revision::DELETED_COMMENT ) ) {
+                       return ' <span class="history-deleted">' .
+                               $this->msg( 'rev-deleted-comment' )->escaped() . '</span>';
+               } else {
+                       return Linker::commentBlock( $rc->mAttribs['rc_comment'], $rc->getTitle() );
                }
 
                return '';
index 7307c69..0c073c6 100644 (file)
@@ -143,11 +143,7 @@ class EnhancedChangesList extends ChangesList {
 
                $type = $cacheEntry->mAttribs['rc_type'];
 
-               // @todo remove handling for RC_MOVE and RC_MOVE_OVER_REDIRECT (bug 63755)
-               if ( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) {
-                       // Use an # character to prevent collision with page names
-                       $cacheGroupingKey = '##' . ( $this->rcMoveIndex++ );
-               } elseif ( $type == RC_LOG ) {
+               if ( $type == RC_LOG ) {
                        // Group by log type
                        $cacheGroupingKey = SpecialPage::getTitleFor(
                                'Log',
@@ -551,16 +547,12 @@ class EnhancedChangesList extends ChangesList {
 
                $r .= '<td class="mw-enhanced-rc"><span class="mw-enhancedchanges-arrow-space"></span>';
                # Flag and Timestamp
-               if ( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) {
-                       $r .= $this->recentChangesFlags( array() ); // no flags, but need the placeholders
-               } else {
-                       $r .= $this->recentChangesFlags( array(
-                               'newpage' => $type == RC_NEW,
-                               'minor' => $rcObj->mAttribs['rc_minor'],
-                               'unpatrolled' => $rcObj->unpatrolled,
-                               'bot' => $rcObj->mAttribs['rc_bot'],
-                       ) );
-               }
+               $r .= $this->recentChangesFlags( array(
+                       'newpage' => $type == RC_NEW,
+                       'minor' => $rcObj->mAttribs['rc_minor'],
+                       'unpatrolled' => $rcObj->unpatrolled,
+                       'bot' => $rcObj->mAttribs['rc_bot'],
+               ) );
                $r .= '&#160;' . $rcObj->timestamp . '&#160;</td><td>';
                # Article or log link
                if ( $logType ) {
index 458f21a..d590ff6 100644 (file)
@@ -53,10 +53,7 @@ class OldChangesList extends ChangesList {
                $classes[] = $watched && $rc->mAttribs['rc_timestamp'] >= $watched
                        ? 'mw-changeslist-line-watched' : 'mw-changeslist-line-not-watched';
 
-               // Moved pages (very very old, not supported anymore)
-               if ( $rc->mAttribs['rc_type'] == RC_MOVE || $rc->mAttribs['rc_type'] == RC_MOVE_OVER_REDIRECT ) {
-               // Log entries
-               } elseif ( $rc->mAttribs['rc_log_type'] ) {
+               if ( $rc->mAttribs['rc_log_type'] ) {
                        $logtitle = SpecialPage::getTitleFor( 'Log', $rc->mAttribs['rc_log_type'] );
                        $this->insertLog( $s, $logtitle, $rc->mAttribs['rc_log_type'] );
                // Log entries (old format) or log targets, and special pages
index 25a572b..c3fe183 100644 (file)
@@ -97,11 +97,8 @@ class RCCacheEntryFactory {
        private function buildCLink( RecentChange $cacheEntry ) {
                $type = $cacheEntry->mAttribs['rc_type'];
 
-               // Page moves, very old style, not supported anymore
-               if ( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) {
-                       $clink = '';
                // New unpatrolled pages
-               } elseif ( $cacheEntry->unpatrolled && $type == RC_NEW ) {
+               if ( $cacheEntry->unpatrolled && $type == RC_NEW ) {
                        $clink = Linker::linkKnown( $cacheEntry->getTitle() );
                // Log entries
                } elseif ( $type == RC_LOG ) {
@@ -171,7 +168,7 @@ class RCCacheEntryFactory {
        private function buildCurLink( RecentChange $cacheEntry, $showDiffLinks, $counter ) {
                $queryParams = $this->buildCurQueryParams( $cacheEntry );
                $curMessage = $this->getMessage( 'cur' );
-               $logTypes = array( RC_LOG, RC_MOVE, RC_MOVE_OVER_REDIRECT );
+               $logTypes = array( RC_LOG );
 
                if ( !$showDiffLinks || in_array( $cacheEntry->mAttribs['rc_type'], $logTypes ) ) {
                        $curLink = $curMessage;
@@ -206,7 +203,7 @@ class RCCacheEntryFactory {
        private function buildDiffLink( RecentChange $cacheEntry, $showDiffLinks, $counter ) {
                $queryParams = $this->buildDiffQueryParams( $cacheEntry );
                $diffMessage = $this->getMessage( 'diff' );
-               $logTypes = array( RC_NEW, RC_LOG, RC_MOVE, RC_MOVE_OVER_REDIRECT );
+               $logTypes = array( RC_NEW, RC_LOG );
 
                if ( !$showDiffLinks ) {
                        $diffLink = $diffMessage;
@@ -230,7 +227,7 @@ class RCCacheEntryFactory {
                $lastOldid = $cacheEntry->mAttribs['rc_last_oldid'];
                $lastMessage = $this->getMessage( 'last' );
                $type = $cacheEntry->mAttribs['rc_type'];
-               $logTypes = array( RC_LOG, RC_MOVE, RC_MOVE_OVER_REDIRECT );
+               $logTypes = array( RC_LOG );
 
                // Make "last" link
                if ( !$showDiffLinks || !$lastOldid || in_array( $type, $logTypes ) ) {
index 60aba7e..8fa6ed9 100644 (file)
@@ -147,18 +147,12 @@ class RecentChange {
                        case RC_NEW:
                                $type = 'new';
                                break;
-                       case RC_MOVE: // obsolete
-                               $type = 'move';
-                               break;
                        case RC_LOG:
                                $type = 'log';
                                break;
                        case RC_EXTERNAL:
                                $type = 'external';
                                break;
-                       case RC_MOVE_OVER_REDIRECT: // obsolete
-                               $type = 'move over redirect';
-                               break;
                        default:
                                $type = "$rcType";
                }