Version 4.7.23

This commit is contained in:
Neo committed 2025-12-19 16:21:27 -08:00
1 parent 7124a02564
commit 25ddeb65d6
1791 files changed
+76990 -44452

No files matched your search

+10 -1
View File
@@ -40,7 +40,7 @@ class _files extends \IPS\Content\Api\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
@@ -59,6 +59,14 @@ class _files extends \IPS\Content\Api\ItemController
$sortBy = 'file_rating ' . $sortDirection . ', file_reviews';
$where = array( array( 'file_rating>?', 0 ) );
}
elseif( \IPS\Request::i()->sortBy == 'downloads' )
{
$sortBy = 'file_downloads';
if( !isset( \IPS\Request::i()->sortDir ) )
{
\IPS\Request::i()->sortDir = 'desc';
}
}
/* Return */
return $this->_list( $where, 'categories', FALSE, $sortBy );
@@ -763,6 +771,7 @@ class _files extends \IPS\Content\Api\ItemController
/* Save */
$file->updated = time();
$file->published = time();
$file->save();
/* Send notifications */