r80328 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80327‎ | r80328 | r80329 >
Date:21:24, 14 January 2011
Author:reedy
Status:ok
Tags:
Comment:
Remove ancient comment, collapse if, move USE INDEX into if further down doing the exact same
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryCategoryMembers.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryCategoryMembers.php
@@ -92,13 +92,6 @@
9393 $this->addFieldsIf( 'cl_type', $fld_type );
9494 $this->addTables( array( 'page', 'categorylinks' ) ); // must be in this order for 'USE INDEX'
9595
96 - // Not needed after bug 10280 is applied to servers
97 - if ( $params['sort'] == 'timestamp' ) {
98 - $this->addOption( 'USE INDEX', 'cl_timestamp' );
99 - } else {
100 - $this->addOption( 'USE INDEX', 'cl_sortkey' );
101 - }
102 -
10396 $this->addWhere( 'cl_from=page_id' );
10497 $this->setContinuation( $params['continue'], $params['dir'] );
10598 $this->addWhereFld( 'cl_to', $categoryTitle->getDBkey() );
@@ -122,6 +115,8 @@
123116 $dir,
124117 $params['start'],
125118 $params['end'] );
 119+
 120+ $this->addOption( 'USE INDEX', 'cl_timestamp' );
126121 } else {
127122 $this->addWhereRange( 'cl_sortkey',
128123 $dir,
@@ -129,6 +124,7 @@
130125 $params['endsortkey'] );
131126
132127 $this->addWhereRange( 'cl_from', $dir, null, null );
 128+ $this->addOption( 'USE INDEX', 'cl_sortkey' );
133129 }
134130
135131 $limit = $params['limit'];

Follow-up revisions

RevisionCommit summaryAuthorDate
r807221.17: MFT r80324, r80326, r80328, r80339, r80350, r80351, r80355, r80358, r80...catrope23:00, 21 January 2011

Status & tagging log