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:
parent
99571fe48c
commit
5e61ff9544
1 changed files with 3 additions and 0 deletions
|
@ -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();
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue