mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
This commit is contained in:
parent
40972e8cd4
commit
0076da9c6c
2 changed files with 4 additions and 2 deletions
|
@ -2326,6 +2326,8 @@ 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 if ($with_order_only) {
|
||||||
|
$sql .= " ORDER BY v.`order` ASC ";
|
||||||
}else {
|
}else {
|
||||||
$sql .= " ORDER BY v.created DESC ";
|
$sql .= " ORDER BY v.created DESC ";
|
||||||
}
|
}
|
||||||
|
|
|
@ -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']);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue