Removed $wgOldChangeTagsIndex
authorReedy <reedy@wikimedia.org>
Fri, 12 Jul 2013 18:06:15 +0000 (19:06 +0100)
committerReedy <reedy@wikimedia.org>
Fri, 12 Jul 2013 18:06:15 +0000 (19:06 +0100)
Bug 40866

Change-Id: Ifa003dece15d0866ed50cf3e2ecc6a5e70a3932a

RELEASE-NOTES-1.22
includes/ChangeTags.php
includes/DefaultSettings.php
includes/api/ApiQueryLogEvents.php
includes/api/ApiQueryRecentChanges.php
includes/api/ApiQueryRevisions.php
includes/api/ApiQueryUserContributions.php

index cde5b26..a1af05d 100644 (file)
@@ -38,6 +38,7 @@ production.
 * The 'protect' and 'autoconfirmed' rights are no longer used for the default
   page protection levels. The rights 'editprotected' and 'editsemiprotected'
   are now used for this purpose instead.
+* (bug 40866) wgOldChangeTagsIndex removed.
 
 === New features in 1.22 ===
 * (bug 44525) mediawiki.jqueryMsg can now parse (whitelisted) HTML elements and attributes.
index 32440f5..e94143a 100644 (file)
@@ -202,9 +202,7 @@ class ChangeTags {
                        // Add an INNER JOIN on change_tag
 
                        // FORCE INDEX -- change_tags will almost ALWAYS be the correct query plan.
-                       global $wgOldChangeTagsIndex;
-                       $index = $wgOldChangeTagsIndex ? 'ct_tag' : 'change_tag_tag_id';
-                       $options['USE INDEX'] = array( 'change_tag' => $index );
+                       $options['USE INDEX'] = array( 'change_tag' => 'change_tag_tag_id' );
                        unset( $options['FORCE INDEX'] );
                        $tables[] = 'change_tag';
                        $join_conds['change_tag'] = array( 'INNER JOIN', "ct_$join_cond=$join_cond" );
index f6c2a93..080c01e 100644 (file)
@@ -1634,11 +1634,6 @@ $wgSlaveLagWarning = 10;
 /** @see $wgSlaveLagWarning */
 $wgSlaveLagCritical = 30;
 
-/**
- * Use old names for change_tags indices.
- */
-$wgOldChangeTagsIndex = false;
-
 /**@}*/ # End of DB settings }
 
 /************************************************************************//**
index 96d02da..1a2719e 100644 (file)
@@ -98,8 +98,7 @@ class ApiQueryLogEvents extends ApiQueryBase {
                        $this->addTables( 'change_tag' );
                        $this->addJoinConds( array( 'change_tag' => array( 'INNER JOIN', array( 'log_id=ct_log_id' ) ) ) );
                        $this->addWhereFld( 'ct_tag', $params['tag'] );
-                       global $wgOldChangeTagsIndex;
-                       $index['change_tag'] = $wgOldChangeTagsIndex ? 'ct_tag' : 'change_tag_tag_id';
+                       $index['change_tag'] = 'change_tag_tag_id';
                }
 
                if ( !is_null( $params['action'] ) ) {
index a5a3b8c..6b10bdc 100644 (file)
@@ -294,8 +294,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                        $this->addTables( 'change_tag' );
                        $this->addJoinConds( array( 'change_tag' => array( 'INNER JOIN', array( 'rc_id=ct_rc_id' ) ) ) );
                        $this->addWhereFld( 'ct_tag', $params['tag'] );
-                       global $wgOldChangeTagsIndex;
-                       $index['change_tag'] = $wgOldChangeTagsIndex ? 'ct_tag' : 'change_tag_tag_id';
+                       $index['change_tag'] = 'change_tag_tag_id';
                }
 
                $this->token = $params['token'];
index 5a22311..415288e 100644 (file)
@@ -189,8 +189,7 @@ class ApiQueryRevisions extends ApiQueryBase {
                        $this->addTables( 'change_tag' );
                        $this->addJoinConds( array( 'change_tag' => array( 'INNER JOIN', array( 'rev_id=ct_rev_id' ) ) ) );
                        $this->addWhereFld( 'ct_tag', $params['tag'] );
-                       global $wgOldChangeTagsIndex;
-                       $index['change_tag'] = $wgOldChangeTagsIndex ? 'ct_tag' : 'change_tag_tag_id';
+                       $index['change_tag'] = 'change_tag_tag_id';
                }
 
                if ( isset( $prop['content'] ) || !is_null( $this->difftotext ) ) {
index 1e013eb..9a9be7b 100644 (file)
@@ -268,8 +268,7 @@ class ApiQueryContributions extends ApiQueryBase {
                        $this->addTables( 'change_tag' );
                        $this->addJoinConds( array( 'change_tag' => array( 'INNER JOIN', array( 'rev_id=ct_rev_id' ) ) ) );
                        $this->addWhereFld( 'ct_tag', $this->params['tag'] );
-                       global $wgOldChangeTagsIndex;
-                       $index['change_tag'] = $wgOldChangeTagsIndex ? 'ct_tag' : 'change_tag_tag_id';
+                       $index['change_tag'] = 'change_tag_tag_id';
                }
 
                if ( $this->params['toponly'] ) {