Version 5.0.6

This commit is contained in:
Neo committed 2025-12-19 18:55:49 -08:00
1 parent a3a4a9ccbd
commit b89858b2ff
1214 files changed
+92828 -14859

No files matched your search

+9 -1
View File
@@ -72,7 +72,7 @@ class files extends ItemController
* @apiparam int hidden If 1, only files which are hidden are returned, if 0 only not hidden
* @apiparam int pinned If 1, only files which are pinned are returned, if 0 only not pinned
* @apiparam int featured If 1, only files which are featured are returned, if 0 only not featured
* @apiparam string sortBy What to sort by. Can be 'date' for creation date, 'title', 'updated', 'popular' or leave unspecified for ID
* @apiparam string sortBy What to sort by. Can be 'date' for creation date, 'title', 'updated', 'popular', 'downloads' or leave unspecified for ID
* @apiparam string sortDir Sort direction. Can be 'asc' or 'desc' - defaults to 'asc'
* @apiparam int page Page number
* @apiparam int perPage Number of results per page - defaults to 25
@@ -92,6 +92,14 @@ class files extends ItemController
$sortBy = 'file_rating ' . $sortDirection . ', file_reviews';
$where = array( array( 'file_rating>?', 0 ) );
}
elseif( Request::i()->sortBy == 'downloads' )
{
$sortBy = 'file_downloads';
if( !isset( Request::i()->sortDir ) )
{
Request::i()->sortDir = 'desc';
}
}
/* Return */
return $this->_list( $where, 'categories', FALSE, $sortBy );