Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 28 |
|
0.00% |
0 / 8 |
CRAP | |
0.00% |
0 / 1 |
SpecialUncategorizedImages | |
0.00% |
0 / 27 |
|
0.00% |
0 / 8 |
72 | |
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 | |||
getGroupName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | /** |
3 | * Implements Special:Uncategorizedimages |
4 | * |
5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation; either version 2 of the License, or |
8 | * (at your option) any later version. |
9 | * |
10 | * This program is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | * GNU General Public License for more details. |
14 | * |
15 | * You should have received a copy of the GNU General Public License along |
16 | * with this program; if not, write to the Free Software Foundation, Inc., |
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
18 | * http://www.gnu.org/copyleft/gpl.html |
19 | * |
20 | * @file |
21 | * @ingroup SpecialPage |
22 | * @author Rob Church <robchur@gmail.com> |
23 | */ |
24 | |
25 | namespace MediaWiki\Specials; |
26 | |
27 | use MediaWiki\SpecialPage\ImageQueryPage; |
28 | use Wikimedia\Rdbms\IConnectionProvider; |
29 | |
30 | /** |
31 | * Special page lists images which haven't been categorised |
32 | * |
33 | * @ingroup SpecialPage |
34 | * @todo FIXME: Use an instance of UncategorizedPagesPage or something |
35 | */ |
36 | class SpecialUncategorizedImages extends ImageQueryPage { |
37 | |
38 | /** |
39 | * @param IConnectionProvider $dbProvider |
40 | */ |
41 | public function __construct( IConnectionProvider $dbProvider ) { |
42 | parent::__construct( 'Uncategorizedimages' ); |
43 | $this->setDatabaseProvider( $dbProvider ); |
44 | } |
45 | |
46 | protected function sortDescending() { |
47 | return false; |
48 | } |
49 | |
50 | public function isExpensive() { |
51 | return true; |
52 | } |
53 | |
54 | public function isSyndicated() { |
55 | return false; |
56 | } |
57 | |
58 | protected function getOrderFields() { |
59 | return [ 'title' ]; |
60 | } |
61 | |
62 | public function execute( $par ) { |
63 | $this->addHelpLink( 'Help:Categories' ); |
64 | parent::execute( $par ); |
65 | } |
66 | |
67 | public function getQueryInfo() { |
68 | return [ |
69 | 'tables' => [ 'page', 'categorylinks' ], |
70 | 'fields' => [ |
71 | 'namespace' => 'page_namespace', |
72 | 'title' => 'page_title', |
73 | ], |
74 | 'conds' => [ |
75 | 'cl_from' => null, |
76 | 'page_namespace' => NS_FILE, |
77 | 'page_is_redirect' => 0, |
78 | ], |
79 | 'join_conds' => [ |
80 | 'categorylinks' => [ |
81 | 'LEFT JOIN', |
82 | 'cl_from=page_id', |
83 | ], |
84 | ], |
85 | ]; |
86 | } |
87 | |
88 | protected function getGroupName() { |
89 | return 'maintenance'; |
90 | } |
91 | } |
92 | |
93 | /** |
94 | * Retain the old class name for backwards compatibility. |
95 | * @deprecated since 1.41 |
96 | */ |
97 | class_alias( SpecialUncategorizedImages::class, 'SpecialUncategorizedImages' ); |