X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSpecialUncategorizedpages.php;h=cae34fe2260f9b9ba0698250f3d4753516dc2b62;hb=3de6fd8c819d21bb3814a6f97d429c1912f5c048;hp=fc58e4566f3025767bf86c5f54db925df0d2ff2c;hpb=ba2afcd9fa9b1f3f6a865da054068466164fd2fa;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SpecialUncategorizedpages.php b/includes/SpecialUncategorizedpages.php old mode 100755 new mode 100644 index fc58e4566f..cae34fe226 --- a/includes/SpecialUncategorizedpages.php +++ b/includes/SpecialUncategorizedpages.php @@ -1,21 +1,15 @@ tableNames( 'cur', 'categorylinks' ) ); + function isSyndicated() { return false; } - return "SELECT 'Uncategorizedpages' as type, cur_namespace AS namespace, cur_title AS title, cur_title AS value " . - "FROM $cur LEFT JOIN $categorylinks ON cur_id=cl_from ". - "WHERE cl_from IS NULL AND cur_namespace=0 AND cur_is_redirect=0"; + function getSQL() { + $dbr = wfGetDB( DB_SLAVE ); + list( $page, $categorylinks ) = $dbr->tableNamesN( 'page', 'categorylinks' ); + $name = $dbr->addQuotes( $this->getName() ); + + return + " + SELECT + $name as type, + page_namespace AS namespace, + page_title AS title, + page_title AS value + FROM $page + LEFT JOIN $categorylinks ON page_id=cl_from + WHERE cl_from IS NULL AND page_namespace={$this->requestedNamespace} AND page_is_redirect=0 + "; } }