From 8104ce66ffa84b2e1fb44216bb6589aaa4a5289b Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Wed, 28 Dec 2016 12:19:40 +0100 Subject: [PATCH] Use namespace weight in page query. - Fix: Custom namespace weights were not respected. Closes #15. --- includes/LinkTitles_Extension.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/LinkTitles_Extension.php b/includes/LinkTitles_Extension.php index 60eaa44..e3951af 100644 --- a/includes/LinkTitles_Extension.php +++ b/includes/LinkTitles_Extension.php @@ -165,7 +165,7 @@ class Extension { 'page_title NOT IN ' . $blackList, ), __METHOD__, - array( 'ORDER BY' => 'CHAR_LENGTH(page_title) ' . $sort_order ) + array( 'ORDER BY' => 'weight ASC, CHAR_LENGTH(page_title) ' . $sort_order ) ); } catch (Exception $e) { $res = $dbr->select( @@ -177,7 +177,7 @@ class Extension { 'page_title NOT IN ' . $blackList, ), __METHOD__, - array( 'ORDER BY' => 'LENGTH(page_title) ' . $sort_order ) + array( 'ORDER BY' => 'weight ASC, LENGTH(page_title) ' . $sort_order ) ); }