diff options
author | cflip <36554078+cflip@users.noreply.github.com> | 2021-04-17 17:36:18 -0600 |
---|---|---|
committer | cflip <36554078+cflip@users.noreply.github.com> | 2021-04-17 17:36:18 -0600 |
commit | faae3f3906575b9c72d628a5e48d03f943c794fc (patch) | |
tree | ae3290ba4a1377f95f5c2081ffebe7124958872c /index.php | |
parent | 0b045d57b2164b5ce003955d79627ae506a153eb (diff) |
Automatically sort threads without PHP comparisons
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 9 |
1 files changed, 0 insertions, 9 deletions
@@ -27,16 +27,7 @@ include_once 'includes/db_inc.php'; include_once 'model/Category.php'; - // TODO: The get_all_categories function should return them in the right order - function cmp($a, $b) { - if ($a->id == $b->id) { - return 0; - } - return ($a->id < $b->id) ? -1 : 1; - } - $categories = get_all_categories($dbc); - usort($categories, "cmp"); foreach ($categories as $category) { $latest_thread = $category->get_latest_thread($dbc); |