1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00

Set default sort order for video retrieval when no sort parameter is provided

This commit is contained in:
Daniel Neto 2025-06-30 10:05:12 -03:00
parent 99571fe48c
commit 5e61ff9544

View file

@ -1549,6 +1549,9 @@ class API extends PluginAbstract
$rows = Video::getVideoFromCleanTitle($parameters['clean_title']);
$totalRows = empty($rows) ? 0 : 1;
} else {
if(empty($_GET['sort']) && empty($_REQUEST['sort']) && empty($_POST['sort'])){
$_POST['sort'] = array('created' => 'desc');
}
$rows = Video::getAllVideos();
$totalRows = Video::getTotalVideos();
/*