Skip to content

Commit e28a3c9

Browse files
committed
Issues-507: Use default order of forums from settings
1 parent b582169 commit e28a3c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vanilla/applications/vanilla/controllers/class.categoriescontroller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ public function all($Category = '', $displayAs = '') {
614614
}
615615
// FIX: https://github.com/topcoder-platform/forums/issues/422
616616
// Sorting for Flat type in SQL
617-
if($displayAs != 'Flat') {
617+
if($displayAs != 'Flat' && $Category) {
618618
if ($this->data('CategorySort')) {
619619
if ($this->data('CategorySort') == self::SORT_OLDEST_POST) {
620620
usort($categoryTree, function ($a, $b) {

0 commit comments

Comments
 (0)