mirror of
https://github.com/diocloid/LinkTitles.git
synced 2025-07-13 17:59:29 +02:00
Merge pull request #16 from labster/develop
Use underscores when searching the page table, not spaces
This commit is contained in:
@ -130,8 +130,8 @@ class Extension {
|
|||||||
|
|
||||||
// Build a blacklist of pages that are not supposed to be link
|
// Build a blacklist of pages that are not supposed to be link
|
||||||
// targets. This includes the current page.
|
// targets. This includes the current page.
|
||||||
$blackList = str_replace( '_', ' ',
|
$blackList = str_replace( ' ', '_',
|
||||||
'("' . implode( '", "',$wgLinkTitlesBlackList ) . '", "' .
|
'("' . implode( '","',$wgLinkTitlesBlackList ) . '","' .
|
||||||
addslashes( self::$currentTitle->getDbKey() ) . '")' );
|
addslashes( self::$currentTitle->getDbKey() ) . '")' );
|
||||||
|
|
||||||
$currentNamespace[] = $title->getNamespace();
|
$currentNamespace[] = $title->getNamespace();
|
||||||
@ -148,7 +148,7 @@ class Extension {
|
|||||||
$weightSelect = $weightSelect . " WHEN " . $namspacevalue . " THEN " . $currentWeight . PHP_EOL;
|
$weightSelect = $weightSelect . " WHEN " . $namspacevalue . " THEN " . $currentWeight . PHP_EOL;
|
||||||
}
|
}
|
||||||
$weightSelect = $weightSelect . " END ";
|
$weightSelect = $weightSelect . " END ";
|
||||||
$namespacesClause = str_replace( '_', ' ','(' . implode( ', ',$namespaces ) . ')' );
|
$namespacesClause = '(' . implode( ', ', $namespaces ) . ')';
|
||||||
|
|
||||||
// Build an SQL query and fetch all page titles ordered by length from
|
// Build an SQL query and fetch all page titles ordered by length from
|
||||||
// shortest to longest. Only titles from 'normal' pages (namespace uid
|
// shortest to longest. Only titles from 'normal' pages (namespace uid
|
||||||
@ -477,6 +477,6 @@ private static function BuildDelimiters() {
|
|||||||
}
|
}
|
||||||
wfDebugLog('LinkTitles', $text , 'private');
|
wfDebugLog('LinkTitles', $text , 'private');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// vim: ts=2:sw=2:noet:comments^=\:///
|
// vim: ts=2:sw=2:noet:comments^=\:///
|
||||||
|
Reference in New Issue
Block a user