X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialDoubleRedirects.php;h=512fd8569d699a76fac406f70177e71230691268;hb=81428046c0d14b84b27a00733258bf008d2e8088;hp=ee073235e0415fe3ade9be1d50ba29deead9c996;hpb=9f8021e18c4a5257041e4fa537c373cf7d73d4dd;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialDoubleRedirects.php b/includes/specials/SpecialDoubleRedirects.php index ee073235e0..512fd8569d 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', @@ -117,7 +118,7 @@ class DoubleRedirectsPage extends QueryPage { $dbr = wfGetDB( DB_SLAVE ); $qi = $this->reallyGetQueryInfo( $result->namespace, $result->title ); - $res = $dbr->select($qi['tables'], $qi['fields'], + $res = $dbr->select( $qi['tables'], $qi['fields'], $qi['conds'], __METHOD__ ); if ( $res ) { $result = $dbr->fetchObject( $res ); @@ -128,7 +129,7 @@ class DoubleRedirectsPage extends QueryPage { } $titleB = Title::makeTitle( $result->nsb, $result->tb ); - $titleC = Title::makeTitle( $result->nsc, $result->tc, '', $result->iwc ); + $titleC = Title::makeTitle( $result->nsc, $result->tc, '', $result->iwc ); $linkA = Linker::linkKnown( $titleA,