Index: trunk/phase3/includes/api/ApiQueryQueryPage.php |
— | — | @@ -37,6 +37,15 @@ |
38 | 38 | class ApiQueryQueryPage extends ApiQueryGeneratorBase { |
39 | 39 | private $qpMap; |
40 | 40 | |
| 41 | + /** |
| 42 | + * Some query pages are useless because they're available elsewhere in the API |
| 43 | + */ |
| 44 | + private $uselessQueryPages = array( |
| 45 | + 'MIMEsearch', // aiprop=mime |
| 46 | + 'LinkSearch', // list=exturlusage |
| 47 | + 'FileDuplicateSearch', // prop=duplicatefiles |
| 48 | + ); |
| 49 | + |
41 | 50 | public function __construct( $query, $moduleName ) { |
42 | 51 | parent::__construct( $query, $moduleName, 'qp' ); |
43 | 52 | // We need to do this to make sure $wgQueryPages is set up |
— | — | @@ -48,7 +57,9 @@ |
49 | 58 | global $wgQueryPages; |
50 | 59 | $this->qpMap = array(); |
51 | 60 | foreach ( $wgQueryPages as $page ) { |
52 | | - $this->qpMap[$page[1]] = $page[0]; |
| 61 | + if( !in_array( $page[1], $this->uselessQueryPages ) ) { |
| 62 | + $this->qpMap[$page[1]] = $page[0]; |
| 63 | + } |
53 | 64 | } |
54 | 65 | } |
55 | 66 | |