mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 19:42:38 +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']);
|
$rows = Video::getVideoFromCleanTitle($parameters['clean_title']);
|
||||||
$totalRows = empty($rows) ? 0 : 1;
|
$totalRows = empty($rows) ? 0 : 1;
|
||||||
} else {
|
} else {
|
||||||
|
if(empty($_GET['sort']) && empty($_REQUEST['sort']) && empty($_POST['sort'])){
|
||||||
|
$_POST['sort'] = array('created' => 'desc');
|
||||||
|
}
|
||||||
$rows = Video::getAllVideos();
|
$rows = Video::getAllVideos();
|
||||||
$totalRows = Video::getTotalVideos();
|
$totalRows = Video::getTotalVideos();
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue