1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
Daniel Neto 2023-10-18 16:00:17 -03:00
parent 40972e8cd4
commit 0076da9c6c
2 changed files with 4 additions and 2 deletions

View file

@ -2326,7 +2326,9 @@ if (!class_exists('Video')) {
if ($suggestedOnly) { if ($suggestedOnly) {
$sql .= " AND v.isSuggested = 1 AND v.status = '" . self::$statusActive . "' "; $sql .= " AND v.isSuggested = 1 AND v.status = '" . self::$statusActive . "' ";
$sql .= " ORDER BY RAND() "; $sql .= " ORDER BY RAND() ";
} else { } else if ($with_order_only) {
$sql .= " ORDER BY v.`order` ASC ";
}else {
$sql .= " ORDER BY v.created DESC "; $sql .= " ORDER BY v.created DESC ";
} }
if (strpos(mb_strtolower($sql), 'limit') === false) { if (strpos(mb_strtolower($sql), 'limit') === false) {

View file

@ -10,7 +10,7 @@ if (!Permissions::canAdminVideos()) {
$videos = array(); $videos = array();
setRowCount(100); setRowCount(100);
$row = Video::getAllVideosLight("viewable", false, true, false, '', 0, true); $row = Video::getAllVideosLight("", false, true, false, '', 0, true);
foreach ($row as $key => $value) { foreach ($row as $key => $value) {
$videos[] = array('videos_id' => $value['id'], 'title' => $value['title'], 'order' => $value['order']); $videos[] = array('videos_id' => $value['id'], 'title' => $value['title'], 'order' => $value['order']);
} }