Skip to content

Node.js based forum software built for the modern web

groups sorting by creation date

Julian Lam3ade5da00fe6
diff --git a/src/groups.js b/src/groups.js
index fe44bb367a..0dcb9379a8 100644
--- a/src/groups.js
+++ b/src/groups.js
@@ -920,6 +920,12 @@ var async = require('async'),
});
break;
+ case 'date':
+ groups = groups.sort(function(a, b) {
+ return a.createtime < b.createtime;
+ });
+ break;
+
case 'alpha': // intentional fall-through
default:
groups = groups.sort(function(a, b) {