X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialWantedpages.php;h=c37ecbd17adf9ae1aa3bfb47965bbb3417b6a716;hp=76b721c5423462d4635ad9d8ed2e629a4b12a197;hb=ce079cf6ad79ca8d3360817f809b219d166f9153;hpb=adae996840b9e782f6e14b21c433a83e37c3a74e diff --git a/includes/specials/SpecialWantedpages.php b/includes/specials/SpecialWantedpages.php index 76b721c542..c37ecbd17a 100644 --- a/includes/specials/SpecialWantedpages.php +++ b/includes/specials/SpecialWantedpages.php @@ -49,6 +49,7 @@ class WantedPagesPage extends WantedQueryPage { } function getQueryInfo() { + $dbr = wfGetDB( DB_REPLICA ); $count = $this->getConfig()->get( 'WantedPagesThreshold' ) - 1; $query = [ 'tables' => [ @@ -63,13 +64,13 @@ class WantedPagesPage extends WantedQueryPage { ], 'conds' => [ 'pg1.page_namespace IS NULL', - "pl_namespace NOT IN ( '" . NS_USER . "', '" . NS_USER_TALK . "' )", - "pg2.page_namespace != '" . NS_MEDIAWIKI . "'" + 'pl_namespace NOT IN (' . $dbr->makeList( [ NS_USER, NS_USER_TALK ] ) . ')', + 'pg2.page_namespace != ' . $dbr->addQuotes( NS_MEDIAWIKI ), ], 'options' => [ 'HAVING' => [ - "COUNT(*) > $count", - "COUNT(*) > SUM(pg2.page_is_redirect)" + 'COUNT(*) > ' . $dbr->addQuotes( $count ), + 'COUNT(*) > SUM(pg2.page_is_redirect)' ], 'GROUP BY' => [ 'pl_namespace', 'pl_title' ] ],