From eeed4512e842a3d0d4952e9cc2e592a001c28f07 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Tue, 29 Jan 2013 21:00:33 +0100 Subject: [PATCH] fix hardcoded quote in Special:DoubleRedirects/BrokenRedirects Also remove the extra parentheses, will be added by Database::makeList already. Change-Id: I38efac1af8a4fb1e52d7716a9fe3440510705676 --- includes/specials/SpecialBrokenRedirects.php | 3 ++- includes/specials/SpecialDoubleRedirects.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/specials/SpecialBrokenRedirects.php b/includes/specials/SpecialBrokenRedirects.php index 97de72a118..77b69e8e7e 100644 --- a/includes/specials/SpecialBrokenRedirects.php +++ b/includes/specials/SpecialBrokenRedirects.php @@ -50,6 +50,7 @@ class BrokenRedirectsPage extends QueryPage { } function getQueryInfo() { + $dbr = wfGetDB( DB_SLAVE ); return array( 'tables' => array( 'redirect', @@ -68,7 +69,7 @@ class BrokenRedirectsPage extends QueryPage { // 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( diff --git a/includes/specials/SpecialDoubleRedirects.php b/includes/specials/SpecialDoubleRedirects.php index ee073235e0..73dba5df03 100644 --- a/includes/specials/SpecialDoubleRedirects.php +++ b/includes/specials/SpecialDoubleRedirects.php @@ -51,6 +51,7 @@ class DoubleRedirectsPage extends QueryPage { function reallyGetQueryInfo( $namespace = null, $title = null ) { $limitToTitle = !( $namespace === null && $title === null ); + $dbr = wfGetDB( DB_SLAVE ); $retval = array ( 'tables' => array ( 'ra' => 'redirect', @@ -82,7 +83,7 @@ class DoubleRedirectsPage extends QueryPage { // 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', -- 2.20.1