Author: henrigerrits
Description:
In SMW 1.4.2, Special:Properties doesn't always show the page count; for some properties it displays the sort name instead.
The fix should be quite simple: the order of result fields in the SQL select subquery on line 940 of SMW_SQLStore2.php (function getPropertiesSpecial) is inconsistent with subsequent subqueries in the union:
$res = $db->query('(SELECT smw_id, smw_title, smw_sortkey, COUNT(*) as count FROM ' .
This line should read:
$res = $db->query('(SELECT smw_id, smw_title, COUNT(*) as count, smw_sortkey FROM ' .
Version: unspecified
Severity: minor