}
function getQueryInfo() {
+ $dbr = wfGetDB( DB_SLAVE );
return array(
'tables' => array(
'redirect',
// but aren't "broken" either.
// Special pages and interwiki links
'rd_namespace >= 0',
- '(rd_interwiki IS NULL OR rd_interwiki = "")',
+ 'rd_interwiki IS NULL OR rd_interwiki = ' . $dbr->addQuotes( '' ),
'p2.page_namespace IS NULL',
),
'join_conds' => array(
function reallyGetQueryInfo( $namespace = null, $title = null ) {
$limitToTitle = !( $namespace === null && $title === null );
+ $dbr = wfGetDB( DB_SLAVE );
$retval = array (
'tables' => array (
'ra' => 'redirect',
// Need to check both NULL and "" for some reason,
// apparently either can be stored for non-iw entries.
- '(ra.rd_interwiki IS NULL OR ra.rd_interwiki = "")',
+ 'ra.rd_interwiki IS NULL OR ra.rd_interwiki = ' . $dbr->addQuotes( '' ),
'pb.page_namespace = ra.rd_namespace',
'pb.page_title = ra.rd_title',