From 222b01f5169f1c7e69762e0e8904c24f78f71882 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 28 Jul 2010 11:52:48 +0200 Subject: update to MediaWiki 1.16.0 --- includes/specials/SpecialWithoutinterwiki.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'includes/specials/SpecialWithoutinterwiki.php') diff --git a/includes/specials/SpecialWithoutinterwiki.php b/includes/specials/SpecialWithoutinterwiki.php index 2092e43b..a5d60d2f 100644 --- a/includes/specials/SpecialWithoutinterwiki.php +++ b/includes/specials/SpecialWithoutinterwiki.php @@ -53,7 +53,7 @@ class WithoutInterwikiPage extends PageQueryPage { function getSQL() { $dbr = wfGetDB( DB_SLAVE ); list( $page, $langlinks ) = $dbr->tableNamesN( 'page', 'langlinks' ); - $prefix = $this->prefix ? "AND page_title LIKE '" . $dbr->escapeLike( $this->prefix ) . "%'" : ''; + $prefix = $this->prefix ? 'AND page_title' . $dbr->buildLike( $this->prefix , $dbr->anyString() ) : ''; return "SELECT 'Withoutinterwiki' AS type, page_namespace AS namespace, @@ -75,13 +75,10 @@ class WithoutInterwikiPage extends PageQueryPage { } function wfSpecialWithoutinterwiki() { - global $wgRequest, $wgContLang, $wgCapitalLinks; + global $wgRequest, $wgContLang; list( $limit, $offset ) = wfCheckLimits(); - if( $wgCapitalLinks ) { - $prefix = $wgContLang->ucfirst( $wgRequest->getVal( 'prefix' ) ); - } else { - $prefix = $wgRequest->getVal( 'prefix' ); - } + // Only searching the mainspace anyway + $prefix = Title::capitalize( $wgRequest->getVal( 'prefix' ), NS_MAIN ); $wip = new WithoutInterwikiPage(); $wip->setPrefix( $prefix ); $wip->doQuery( $offset, $limit ); -- cgit v1.2.3-54-g00ecf