fix hardcoded quote in Special:DoubleRedirects/BrokenRedirects
authorumherirrender <umherirrender_de.wp@web.de>
Tue, 29 Jan 2013 20:00:33 +0000 (21:00 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Tue, 29 Jan 2013 20:00:33 +0000 (21:00 +0100)
Also remove the extra parentheses, will be added by Database::makeList
already.

Change-Id: I38efac1af8a4fb1e52d7716a9fe3440510705676

includes/specials/SpecialBrokenRedirects.php
includes/specials/SpecialDoubleRedirects.php

index 97de72a..77b69e8 100644 (file)
@@ -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(
index ee07323..73dba5d 100644 (file)
@@ -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',