From 7d922d08bfc5e514cd6e2b877a376fe10d4d526c Mon Sep 17 00:00:00 2001 From: Reedy Date: Fri, 12 Jul 2013 19:06:15 +0100 Subject: [PATCH] Removed $wgOldChangeTagsIndex Bug 40866 Change-Id: Ifa003dece15d0866ed50cf3e2ecc6a5e70a3932a --- RELEASE-NOTES-1.22 | 1 + includes/ChangeTags.php | 4 +--- includes/DefaultSettings.php | 5 ----- includes/api/ApiQueryLogEvents.php | 3 +-- includes/api/ApiQueryRecentChanges.php | 3 +-- includes/api/ApiQueryRevisions.php | 3 +-- includes/api/ApiQueryUserContributions.php | 3 +-- 7 files changed, 6 insertions(+), 16 deletions(-) diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index cde5b2611c..a1af05d04d 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -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. diff --git a/includes/ChangeTags.php b/includes/ChangeTags.php index 32440f5df4..e94143aa2c 100644 --- a/includes/ChangeTags.php +++ b/includes/ChangeTags.php @@ -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" ); diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index f6c2a939be..080c01e9de 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1634,11 +1634,6 @@ $wgSlaveLagWarning = 10; /** @see $wgSlaveLagWarning */ $wgSlaveLagCritical = 30; -/** - * Use old names for change_tags indices. - */ -$wgOldChangeTagsIndex = false; - /**@}*/ # End of DB settings } /************************************************************************//** diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index 96d02daa55..1a2719edc7 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -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'] ) ) { diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index a5a3b8c0af..6b10bdc63e 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -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']; diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index 5a22311698..415288ef79 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -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 ) ) { diff --git a/includes/api/ApiQueryUserContributions.php b/includes/api/ApiQueryUserContributions.php index 1e013eb3bd..9a9be7b2e2 100644 --- a/includes/api/ApiQueryUserContributions.php +++ b/includes/api/ApiQueryUserContributions.php @@ -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'] ) { -- 2.20.1