This is all I can find related to sort field in that section of the code before the switch, and right after:
PHP Code:
// look at sorting options:
if (!isset($sortorder)) {
$sortorder = "";
}
if (!isset($sortfield)) {
$sortfield = "";
}
if ($sortorder!='asc') {
$sqlsortorder='DESC';
$order['desc']='selected';
} else {
$sqlsortorder='';
$order['asc']='selected';
}
switch ($sortfield) {
case 'title':
case 'lastpost':
case 'replycount':
case 'views':
case 'postusername':
case 'voteavg':
break;
default:
if($foruminfo[forumid]==163) $sortfield='title';
else $sortfield='lastpost';
}
if ($sortfield=="voteavg" and !$foruminfo[allowratings]) {
$sortfield="lastpost";
}
$sort = array();
$sort[$sortfield]='selected';