Merge pull request #16 from labster/develop

Use underscores when searching the page table, not spaces
This commit is contained in:
Daniel Kraus
2016-12-28 12:41:34 +01:00
committed by GitHub

View File

@ -130,7 +130,7 @@ class Extension {
// Build a blacklist of pages that are not supposed to be link
// targets. This includes the current page.
$blackList = str_replace( '_', ' ',
$blackList = str_replace( ' ', '_',
'("' . implode( '","',$wgLinkTitlesBlackList ) . '","' .
addslashes( self::$currentTitle->getDbKey() ) . '")' );
@ -148,7 +148,7 @@ class Extension {
$weightSelect = $weightSelect . " WHEN " . $namspacevalue . " THEN " . $currentWeight . PHP_EOL;
}
$weightSelect = $weightSelect . " END ";
$namespacesClause = str_replace( '_', ' ','(' . implode( ', ',$namespaces ) . ')' );
$namespacesClause = '(' . implode( ', ', $namespaces ) . ')';
// Build an SQL query and fetch all page titles ordered by length from
// shortest to longest. Only titles from 'normal' pages (namespace uid