Commit 97481cb5 authored by Chris Graham's avatar Chris Graham

Fixed MANTIS-3982 (No working topic order sort on MyBB forum driver)

parent 5634082c
......@@ -659,7 +659,7 @@ class Forum_driver_mybb extends Forum_driver_base
}
$topic_filter = ($filter_topic_title != '') ? 'AND subject LIKE \'' . db_encode_like($filter_topic_title) . '\'' : '';
$topic_filter .= ' ORDER BY ' . (($date_key == 'lasttime') ? 'lastpost' : 'lastpost') . ' DESC';
$topic_filter .= ' ORDER BY ' . (($date_key == 'lasttime') ? 'lastpost' : 'dateline') . ' DESC';
$rows = $this->connection->query('SELECT * FROM ' . $this->connection->get_table_prefix() . 'threads WHERE (' . $id_list . ') ' . $topic_filter, $limit, $start);
$max_rows = $this->connection->query_value_if_there('SELECT COUNT(*) FROM ' . $this->connection->get_table_prefix() . 'threads WHERE (' . $id_list . ') ' . $topic_filter);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment