Switch to unified view

a/Allura/allura/lib/macro.py b/Allura/allura/lib/macro.py
...
...
162
    sort_key, sort_dir = 'last_updated', pymongo.DESCENDING
162
    sort_key, sort_dir = 'last_updated', pymongo.DESCENDING
163
    if sort == 'alpha':
163
    if sort == 'alpha':
164
        sort_key, sort_dir = 'name', pymongo.ASCENDING
164
        sort_key, sort_dir = 'name', pymongo.ASCENDING
165
    elif sort == 'random':
165
    elif sort == 'random':
166
        sort_key, sort_dir = None, None
166
        sort_key, sort_dir = None, None
167
    elif sort == 'last_registred':
168
        sort_key, sort_dir = '_id', pymongo.DESCENDING
169
    elif sort == '_id':
170
        sort_key, sort_dir = '_id', pymongo.DESCENDING
167
171
168
    projects = []
172
    projects = []
169
    if private:
173
    if private:
170
        # Only return private projects.
174
        # Only return private projects.
171
        # Can't filter these with a mongo query directly - have to iterate
175
        # Can't filter these with a mongo query directly - have to iterate