I (and my users too) like to have folders first or last (according to sort order)
I added object_type order in :
if ($sortField=="rank") $sql .= " ORDER BY object_type ".$rank." ".$sortDir;
else $sql .= " ORDER BY object_type ".$sortField." ".$sortDir;
Are you able to browse collections with folders first or last, or does this only apply to searches?