mirror of
https://github.com/diocloid/LinkTitles.git
synced 2025-07-13 17:59:29 +02:00
Fix 2
This commit is contained in:
@ -125,7 +125,7 @@
|
||||
$currentNamespace[] = $title->getNamespace();
|
||||
|
||||
// Build our weight list. Make sure current namespace is first element
|
||||
$namespaces = array_unshift( $currentNamespace, array_diff($wgLinkTitlesNamespaces, $currentNamespace) );
|
||||
$namespaces = array_unshift(array_diff($wgLinkTitlesNamespaces, $currentNamespace), $currentNamespace );
|
||||
|
||||
// No need for sanitiy check. we are sure that we have at least one element in the array
|
||||
$weightSelect = "CASE page_namespace ";
|
||||
@ -137,7 +137,7 @@
|
||||
$weightSelect = $weightSelect . " END ";
|
||||
|
||||
$namespacesClause = str_replace( '_', ' ',
|
||||
'("' . implode( '", "',$namespaces ) . '")' );
|
||||
'(' . 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
|
||||
|
Reference in New Issue
Block a user