Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
// this is the default
$sortby = 'date';
if (isset($arr['sortby']) && isset($sort_fields[$arr['sortby']])) {
$sortby = $arr['sortby'];
}
$sortby = $sort_fields[$sortby];
$sql .= " ORDER BY `$sortby` ";
and change it to read:// this is the default
$sortby = 'id';
if (isset($arr['sortby']) && isset($sort_fields[$arr['sortby']])) {
$sortby = $arr['sortby'];
}
$sortby = $sort_fields[$sortby];
$sql .= " ORDER BY `$sortby` ";
$sortdir = ' DESC';
if (isset($arr['sortdir']) && (strcasecmp('asc',$arr['sortdir']) === 0)) {
$sortdir = ' ASC';
}
to:$sortdir = ' ASC';
if (isset($arr['sortdir']) && (strcasecmp('desc',$arr['sortdir']) === 0)) {
$sortdir = ' DESC';
}
// grouping is needed to get comment count
$sql .= " GROUP BY p.`id`";
but just editing this portion out causes an error in the SQL query. It looks like this is not going to be a quick, easy fix, but may need some rewrites to keep the functions consistent with each other.
1 to 15 of 15