Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 32 |
|
0.00% |
0 / 9 |
CRAP | |
0.00% |
0 / 1 |
| SpecialUncategorizedImages | |
0.00% |
0 / 31 |
|
0.00% |
0 / 9 |
90 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| sortDescending | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| isExpensive | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| isSyndicated | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getOrderFields | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| execute | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getQueryInfo | |
0.00% |
0 / 18 |
|
0.00% |
0 / 1 |
2 | |||
| getRecacheDB | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
| getGroupName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * @license GPL-2.0-or-later |
| 4 | * @file |
| 5 | */ |
| 6 | |
| 7 | namespace MediaWiki\Specials; |
| 8 | |
| 9 | use MediaWiki\Deferred\LinksUpdate\CategoryLinksTable; |
| 10 | use MediaWiki\SpecialPage\ImageQueryPage; |
| 11 | use Wikimedia\Rdbms\IConnectionProvider; |
| 12 | |
| 13 | /** |
| 14 | * List of file pages which haven't been categorised |
| 15 | * |
| 16 | * @todo FIXME: Use an instance of UncategorizedPagesPage or something |
| 17 | * |
| 18 | * @ingroup SpecialPage |
| 19 | * @author Rob Church <robchur@gmail.com> |
| 20 | */ |
| 21 | class SpecialUncategorizedImages extends ImageQueryPage { |
| 22 | |
| 23 | public function __construct( IConnectionProvider $dbProvider ) { |
| 24 | parent::__construct( 'Uncategorizedimages' ); |
| 25 | $this->setDatabaseProvider( $dbProvider ); |
| 26 | } |
| 27 | |
| 28 | /** @inheritDoc */ |
| 29 | protected function sortDescending() { |
| 30 | return false; |
| 31 | } |
| 32 | |
| 33 | /** @inheritDoc */ |
| 34 | public function isExpensive() { |
| 35 | return true; |
| 36 | } |
| 37 | |
| 38 | /** @inheritDoc */ |
| 39 | public function isSyndicated() { |
| 40 | return false; |
| 41 | } |
| 42 | |
| 43 | /** @inheritDoc */ |
| 44 | protected function getOrderFields() { |
| 45 | return [ 'title' ]; |
| 46 | } |
| 47 | |
| 48 | /** @inheritDoc */ |
| 49 | public function execute( $par ) { |
| 50 | $this->addHelpLink( 'Help:Categories' ); |
| 51 | parent::execute( $par ); |
| 52 | } |
| 53 | |
| 54 | /** @inheritDoc */ |
| 55 | public function getQueryInfo() { |
| 56 | return [ |
| 57 | 'tables' => [ 'page', 'categorylinks' ], |
| 58 | 'fields' => [ |
| 59 | 'namespace' => 'page_namespace', |
| 60 | 'title' => 'page_title', |
| 61 | ], |
| 62 | 'conds' => [ |
| 63 | 'cl_from' => null, |
| 64 | 'page_namespace' => NS_FILE, |
| 65 | 'page_is_redirect' => 0, |
| 66 | ], |
| 67 | 'join_conds' => [ |
| 68 | 'categorylinks' => [ |
| 69 | 'LEFT JOIN', |
| 70 | 'cl_from=page_id', |
| 71 | ], |
| 72 | ], |
| 73 | ]; |
| 74 | } |
| 75 | |
| 76 | /** @inheritDoc */ |
| 77 | protected function getRecacheDB() { |
| 78 | return $this->getDatabaseProvider()->getReplicaDatabase( |
| 79 | CategoryLinksTable::VIRTUAL_DOMAIN, |
| 80 | 'vslow' |
| 81 | ); |
| 82 | } |
| 83 | |
| 84 | /** @inheritDoc */ |
| 85 | protected function getGroupName() { |
| 86 | return 'maintenance'; |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | /** |
| 91 | * Retain the old class name for backwards compatibility. |
| 92 | * @deprecated since 1.41 |
| 93 | */ |
| 94 | class_alias( SpecialUncategorizedImages::class, 'SpecialUncategorizedImages' ); |