| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
namespace MediaWiki\Specials; |
| 22 |
|
| 23 |
use MediaWiki\SpecialPage\ImageQueryPage; |
| 24 |
use Wikimedia\Rdbms\IConnectionProvider; |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
class SpecialUncategorizedImages extends ImageQueryPage { |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
public function __construct( IConnectionProvider $dbProvider ) { |
| 40 |
parent::__construct( 'Uncategorizedimages' ); |
| 41 |
$this->setDatabaseProvider( $dbProvider ); |
| 42 |
} |
| 43 |
|
| 44 |
protected function sortDescending() { |
| 45 |
return false; |
| 46 |
} |
| 47 |
|
| 48 |
public function isExpensive() { |
| 49 |
return true; |
| 50 |
} |
| 51 |
|
| 52 |
public function isSyndicated() { |
| 53 |
return false; |
| 54 |
} |
| 55 |
|
| 56 |
protected function getOrderFields() { |
| 57 |
return [ 'title' ]; |
| 58 |
} |
| 59 |
|
| 60 |
public function execute( $par ) { |
| 61 |
$this->addHelpLink( 'Help:Categories' ); |
| 62 |
parent::execute( $par ); |
| 63 |
} |
| 64 |
|
| 65 |
public function getQueryInfo() { |
| 66 |
return [ |
| 67 |
'tables' => [ 'page', 'categorylinks' ], |
| 68 |
'fields' => [ |
| 69 |
'namespace' => 'page_namespace', |
| 70 |
'title' => 'page_title', |
| 71 |
], |
| 72 |
'conds' => [ |
| 73 |
'cl_from' => null, |
| 74 |
'page_namespace' => NS_FILE, |
| 75 |
'page_is_redirect' => 0, |
| 76 |
], |
| 77 |
'join_conds' => [ |
| 78 |
'categorylinks' => [ |
| 79 |
'LEFT JOIN', |
| 80 |
'cl_from=page_id', |
| 81 |
], |
| 82 |
], |
| 83 |
]; |
| 84 |
} |
| 85 |
|
| 86 |
protected function getGroupName() { |
| 87 |
return 'maintenance'; |
| 88 |
} |
| 89 |
} |
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
class_alias( SpecialUncategorizedImages::class, 'SpecialUncategorizedImages' ); |