1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 12:00:06 +02:00
This commit is contained in:
Daniel Neto 2024-03-18 10:00:54 -03:00
parent 51fbd37f91
commit 34039647a3
4 changed files with 10 additions and 8 deletions

View file

@ -6623,13 +6623,6 @@ function isOnDeveloperMode()
return (!empty($global['developer_mode']) || (!empty($global['developer_mode_admin_only']) && User::isAdmin())); return (!empty($global['developer_mode']) || (!empty($global['developer_mode_admin_only']) && User::isAdmin()));
} }
function setDefaultSort($defaultSortColumn, $defaultSortOrder)
{
if (empty($_REQUEST['sort']) && empty($_GET['sort']) && empty($_POST['sort']) && empty($_GET['order'][0]['dir'])) {
$_POST['sort'][$defaultSortColumn] = $defaultSortOrder;
}
}
function getWordOrIcon($word, $class = '') function getWordOrIcon($word, $class = '')
{ {
$word = trim($word); $word = trim($word);

View file

@ -237,3 +237,10 @@ function lockForUpdate($tableName, $condition)
return false; return false;
} }
} }
function setDefaultSort($defaultSortColumn, $defaultSortOrder)
{
if (empty($_REQUEST['sort']) && empty($_GET['sort']) && empty($_POST['sort']) && empty($_GET['order'][0]['dir'])) {
$_POST['sort'][$defaultSortColumn] = $defaultSortOrder;
}
}

View file

@ -15,6 +15,7 @@ require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once './playlist.php'; require_once './playlist.php';
header('Content-Type: application/json'); header('Content-Type: application/json');
_error_log('playlistsFromUserVideos getAllFromUser '.$_GET['users_id']); _error_log('playlistsFromUserVideos getAllFromUser '.$_GET['users_id']);
setDefaultSort('created', 'DESC');
//_session_write_close(); //_session_write_close();
$row = PlayList::getAllFromUser($_GET['users_id'], false); $row = PlayList::getAllFromUser($_GET['users_id'], false);
foreach ($row as $key => $value) { foreach ($row as $key => $value) {

View file

@ -2239,7 +2239,8 @@ if (empty($advancedCustom->disableHTMLDescription)) {
url: webSiteRootURL + 'objects/playlistsFromUserVideos.json.php', url: webSiteRootURL + 'objects/playlistsFromUserVideos.json.php',
data: { data: {
"users_id": <?php echo User::getId(); ?>, "users_id": <?php echo User::getId(); ?>,
"videos_id": videos_ids_list "videos_id": videos_ids_list,
"rowCount": 10
}, },
type: 'post', type: 'post',
success: function(response) { success: function(response) {