From 9cde1f82d878160f8e3ad9cc8677453df78c85fb Mon Sep 17 00:00:00 2001 From: Daniel Neto Date: Mon, 20 May 2024 12:44:33 -0300 Subject: [PATCH] Update --- objects/playlist.php | 13 +++++++++++-- view/js/videojs-youtube | 1 - 2 files changed, 11 insertions(+), 3 deletions(-) delete mode 160000 view/js/videojs-youtube diff --git a/objects/playlist.php b/objects/playlist.php index a4b7f3252f00..0bb0ff417268 100644 --- a/objects/playlist.php +++ b/objects/playlist.php @@ -487,6 +487,15 @@ public static function getVideosIndexFromPlaylistLight($playlists_id, $videos_id return 0; } + private static function getOrderBy($prefix=''){ + $order = " ORDER BY {$prefix}`order` ASC, id ASC"; + + //if add in the top + //$order = " ORDER BY {$prefix}`order` ASC, id DESC"; + + return $order; + } + public static function getVideosIDFromPlaylistLight($playlists_id) { global $global, $getVideosIDFromPlaylistLight; @@ -504,7 +513,7 @@ public static function getVideosIDFromPlaylistLight($playlists_id) $formats = 's'; $values = [Video::$statusActive]; } else { - $sql = "SELECT * FROM playlists_has_videos p WHERE playlists_id = ? ORDER BY `order` ASC "; + $sql = "SELECT * FROM playlists_has_videos p WHERE playlists_id = ? ".self::getOrderBy('p.'); $formats = 'i'; $values = [$playlists_id]; } @@ -716,7 +725,7 @@ public static function getAllSubPlayLists($playlists_id, $NOTSubPlaylists = 0) $sql .= ' AND serie_playlists_id IS NOT NULL '; } - $sql .= ' ORDER BY p.`order` ASC '; + $sql .= self::getOrderBy('p.'); $res = sqlDAL::readSql($sql, "i", [$playlists_id]); $fullData = sqlDAL::fetchAllAssoc($res); diff --git a/view/js/videojs-youtube b/view/js/videojs-youtube deleted file mode 160000 index 050c1ee92e4d..000000000000 --- a/view/js/videojs-youtube +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 050c1ee92e4dfd108dbe5bbe0ec3da6decf141a5