Use namespace weight in page query.

- Fix: Custom namespace weights were not respected.

Closes #15.
This commit is contained in:
Daniel Kraus
2016-12-28 12:19:40 +01:00
parent 7394da4c67
commit 8104ce66ff

View File

@ -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 )
);
}