4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 * http://www.gnu.org/copyleft/gpl.html
21 * Special page lists images which haven't been categorised
24 * @ingroup SpecialPage
25 * @author Rob Church <robchur@gmail.com>
29 * @ingroup SpecialPage
31 class UncategorizedImagesPage
extends ImageQueryPage
{
34 return 'Uncategorizedimages';
37 function sortDescending() {
41 function isExpensive() {
45 function isSyndicated() {
50 $dbr = wfGetDB( DB_SLAVE
);
51 list( $page, $categorylinks ) = $dbr->tableNamesN( 'page', 'categorylinks' );
54 return "SELECT 'Uncategorizedimages' AS type, page_namespace AS namespace,
55 page_title AS title, page_title AS value
56 FROM {$page} LEFT JOIN {$categorylinks} ON page_id = cl_from
57 WHERE cl_from IS NULL AND page_namespace = {$ns} AND page_is_redirect = 0";
62 function wfSpecialUncategorizedimages() {
63 $uip = new UncategorizedImagesPage();
64 list( $limit, $offset ) = wfCheckLimits();
65 return $uip->doQuery( $offset, $limit );