}
public function getQueryInfo() {
+ $dbr = wfGetDB( DB_REPLICA );
return [
'tables' => [ 'page', 'watchlist' ],
'fields' => [
'conds' => [
'wl_title IS NULL',
'page_is_redirect' => 0,
- "page_namespace != '" . NS_MEDIAWIKI . "'"
+ 'page_namespace != ' . $dbr->addQuotes( NS_MEDIAWIKI ),
],
'join_conds' => [ 'watchlist' => [
'LEFT JOIN', [ 'wl_title = page_title',
}
function getQueryInfo() {
+ $dbr = wfGetDB( DB_REPLICA );
$count = $this->getConfig()->get( 'WantedPagesThreshold' ) - 1;
$query = [
'tables' => [
],
'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' ]
],