summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialWithoutinterwiki.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/specials/SpecialWithoutinterwiki.php')
-rw-r--r--includes/specials/SpecialWithoutinterwiki.php11
1 files changed, 4 insertions, 7 deletions
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 );