mirror of
https://github.com/diocloid/LinkTitles.git
synced 2025-07-13 17:59:29 +02:00
Fix page black list.
This commit is contained in:
@ -146,8 +146,8 @@
|
|||||||
|
|
||||||
// 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.
|
||||||
$black_list = str_replace( '_', ' ',
|
$blackList = str_replace( '_', ' ',
|
||||||
'("' . implode( '", "',$wgLinkTitlesBlackList ) .
|
'("' . implode( '", "',$wgLinkTitlesBlackList ) . '", "' .
|
||||||
LinkTitles::$currentTitle->getDbKey() . '")' );
|
LinkTitles::$currentTitle->getDbKey() . '")' );
|
||||||
|
|
||||||
// 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
|
||||||
@ -162,7 +162,7 @@
|
|||||||
array(
|
array(
|
||||||
'page_namespace = 0',
|
'page_namespace = 0',
|
||||||
'CHAR_LENGTH(page_title) >= ' . $wgLinkTitlesMinimumTitleLength,
|
'CHAR_LENGTH(page_title) >= ' . $wgLinkTitlesMinimumTitleLength,
|
||||||
'page_title NOT IN ' . $black_list,
|
'page_title NOT IN ' . $blackList,
|
||||||
),
|
),
|
||||||
__METHOD__,
|
__METHOD__,
|
||||||
array( 'ORDER BY' => 'CHAR_LENGTH(page_title) ' . $sort_order )
|
array( 'ORDER BY' => 'CHAR_LENGTH(page_title) ' . $sort_order )
|
||||||
@ -174,7 +174,7 @@
|
|||||||
array(
|
array(
|
||||||
'page_namespace = 0',
|
'page_namespace = 0',
|
||||||
'LENGTH(page_title) >= ' . $wgLinkTitlesMinimumTitleLength,
|
'LENGTH(page_title) >= ' . $wgLinkTitlesMinimumTitleLength,
|
||||||
'page_title NOT IN ' . $black_list,
|
'page_title NOT IN ' . $blackList,
|
||||||
),
|
),
|
||||||
__METHOD__,
|
__METHOD__,
|
||||||
array( 'ORDER BY' => 'LENGTH(page_title) ' . $sort_order )
|
array( 'ORDER BY' => 'LENGTH(page_title) ' . $sort_order )
|
||||||
|
Reference in New Issue
Block a user