Index: trunk/phase3/includes/api/ApiQueryAllpages.php |
— | — | @@ -59,9 +59,9 @@ |
60 | 60 | // Page filters |
61 | 61 | $this->addTables( 'page' ); |
62 | 62 | |
63 | | - if ( $this->params['filterredir'] == 'redirects' ) |
| 63 | + if ( $this->params['filterredir'] === 'redirects' ) |
64 | 64 | $this->addWhereFld( 'page_is_redirect', 1 ); |
65 | | - else if ( $this->params['filterredir'] == 'nonredirects' ) |
| 65 | + else if ( $this->params['filterredir'] === 'nonredirects' ) |
66 | 66 | $this->addWhereFld( 'page_is_redirect', 0 ); |
67 | 67 | |
68 | 68 | $this->addWhereFld( 'page_namespace', $params['namespace'] ); |
— | — | @@ -81,6 +81,7 @@ |
82 | 82 | } else { |
83 | 83 | $selectFields = $resultPageSet->getPageTableFields(); |
84 | 84 | } |
| 85 | + |
85 | 86 | $this->addFields( $selectFields ); |
86 | 87 | $forceNameTitleIndex = true; |
87 | 88 | if ( isset ( $params['minsize'] ) ) { |
— | — | @@ -134,6 +135,7 @@ |
135 | 136 | $this->addOption( 'GROUP BY', implode( ', ', $selectFields ) ); |
136 | 137 | $forceNameTitleIndex = false; |
137 | 138 | } |
| 139 | + |
138 | 140 | if ( $forceNameTitleIndex ) |
139 | 141 | $this->addOption( 'USE INDEX', 'name_title' ); |
140 | 142 | |