1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
This commit is contained in:
Daniel Neto 2024-04-02 14:52:36 -03:00
parent b565543ec0
commit 0c745c6352
8 changed files with 22 additions and 6 deletions

View file

@ -1807,11 +1807,6 @@ if (!class_exists('Video')) {
}
}
if (!empty($videosArrayId) && is_array($videosArrayId) && (is_numeric($videosArrayId[0]))) {
$sql .= " ORDER BY FIELD(v.id, '" . implode("', '", $videosArrayId) . "') ";
} else {
$sql .= self::getSQLByStatus($status, $showUnlisted);
}
//var_dump($max_duration_in_seconds);echo $sql;exit;
$sql .= Video::getCatSQL();
@ -1878,6 +1873,10 @@ if (!class_exists('Video')) {
}
$sql .= self::getSQLSort($sortType, $showOnlyLoggedUserVideos, $showUnlisted, $suggestedOnly);
}else if (!empty($videosArrayId) && is_array($videosArrayId) && (is_numeric($videosArrayId[0]))) {
$sql .= " ORDER BY FIELD(v.id, '" . implode("', '", $videosArrayId) . "') ";
} else {
$sql .= self::getSQLByStatus($status, $showUnlisted);
}
if (strpos(mb_strtolower($sql), 'limit') === false) {
if (!empty($_GET['limitOnceToOne'])) {

View file

@ -389,6 +389,8 @@ function createGallerySectionVideo($video, $showChannel = true, $screenColsLarge
<?php echo $humanTiming; ?>
</time>
<?php
}else{
echo '<!-- empty showCreationTimeOnVideoItem '.basename(__FILE__).' line='.__LINE__.'-->';
}
?>
</div>

View file

@ -175,6 +175,8 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
<?php echo humanTiming(strtotime($videoRow['videoCreation']), 0, true, true); ?>
</div>
<?php
}else{
echo '<!-- empty showCreationTimeOnVideoItem '.basename(__FILE__).' line='.__LINE__.'-->';
}
?>
<?php

View file

@ -251,6 +251,8 @@ unset($_POST['current']);
<?php echo humanTiming(strtotime($value['videoCreation']), 0, true, true); ?>
</div>
<?php
}else{
echo '<!-- empty showCreationTimeOnVideoItem '.basename(__FILE__).' line='.__LINE__.'-->';
}
if (!empty($advancedCustom->showChannelNameOnVideoItem)) {
?>

View file

@ -200,6 +200,8 @@ $_page->setExtraStyles(
<?php echo humanTiming(strtotime($value['videoCreation']), 0, true, true); ?>
</div>
<?php
}else{
echo '<!-- empty showCreationTimeOnVideoItem '.basename(__FILE__).' line='.__LINE__.'-->';
}
if (!empty($advancedCustom->showChannelNameOnVideoItem)) {
?>

View file

@ -200,6 +200,8 @@ if (!empty($evideo)) {
if (!empty($advancedCustom->showCreationTimeOnVideoItem)) {
$created = !empty($video['videoCreation']) ? $video['videoCreation'] : $video['created'];
$html = '<div class="clearfix"></div><small>' . humanTiming(_strtotime($created)) . '</small>';
}else{
$html = '<!-- empty showCreationTimeOnVideoItem '.basename(__FILE__).' line='.__LINE__.'-->';
}
$video['creator'] = Video::getCreatorHTML($video['users_id'], $html);

View file

@ -3,12 +3,17 @@ if (empty($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
require_once $global['systemRootPath'] . 'objects/subscribe.php';
if ((empty($video) || !is_array($video)) && !empty($_GET['videos_id'])) {
if((empty($video) || !is_array($video)) && !empty($_GET['videos_id'])){
$video = Video::getVideo(intval($_GET['videos_id']), Video::SORT_TYPE_VIEWABLE, true, false, true, true);
}
if (is_array($video)) {
$html = '';
//var_dump(__LINE__, !empty($advancedCustom->showCreationTimeOnVideoItem));exit;
if (!empty($advancedCustom->showCreationTimeOnVideoItem)) {
$created = !empty($video['videoCreation']) ? $video['videoCreation'] : $video['created'];
$html = '<div class="clearfix"></div><small>' . humanTiming(_strtotime($created)) . '</small>';
}else{
$html = '<!-- empty showCreationTimeOnVideoItem '.basename(__FILE__).' line='.__LINE__.'-->';
}
$video['creator'] = Video::getCreatorHTML($video['users_id'], $html);
$source = Video::getSourceFile($video['filename']);

View file

@ -124,6 +124,8 @@ $_page->setExtraStyles(
<?php echo humanTiming(strtotime($value['videoCreation']), 0, true, true); ?>
</div>
<?php
}else{
echo '<!-- empty showCreationTimeOnVideoItem '.basename(__FILE__).' line='.__LINE__.'-->';
}
if (!empty($advancedCustom->showChannelNameOnVideoItem)) {
?>