diff --git a/objects/video.php b/objects/video.php index 0d96de6f12..30b992d497 100644 --- a/objects/video.php +++ b/objects/video.php @@ -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'])) { diff --git a/plugin/Gallery/functions.php b/plugin/Gallery/functions.php index 5cb259cfd7..a63cfc3858 100644 --- a/plugin/Gallery/functions.php +++ b/plugin/Gallery/functions.php @@ -389,6 +389,8 @@ function createGallerySectionVideo($video, $showChannel = true, $screenColsLarge '; } ?> diff --git a/plugin/Gallery/view/BigVideo.php b/plugin/Gallery/view/BigVideo.php index 56111de338..645b11dabf 100644 --- a/plugin/Gallery/view/BigVideo.php +++ b/plugin/Gallery/view/BigVideo.php @@ -175,6 +175,8 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) { '; } ?> '; } if (!empty($advancedCustom->showChannelNameOnVideoItem)) { ?> diff --git a/view/channelProgram.php b/view/channelProgram.php index b398bf81e0..0b8c0cee33 100644 --- a/view/channelProgram.php +++ b/view/channelProgram.php @@ -200,6 +200,8 @@ $_page->setExtraStyles( '; } if (!empty($advancedCustom->showChannelNameOnVideoItem)) { ?> diff --git a/view/modeYoutube.php b/view/modeYoutube.php index 311e77dc5b..8269e5474d 100644 --- a/view/modeYoutube.php +++ b/view/modeYoutube.php @@ -200,6 +200,8 @@ if (!empty($evideo)) { if (!empty($advancedCustom->showCreationTimeOnVideoItem)) { $created = !empty($video['videoCreation']) ? $video['videoCreation'] : $video['created']; $html = '
' . humanTiming(_strtotime($created)) . ''; + }else{ + $html = ''; } $video['creator'] = Video::getCreatorHTML($video['users_id'], $html); diff --git a/view/modeYoutubeBottom.php b/view/modeYoutubeBottom.php index d8223595ee..3717079bed 100644 --- a/view/modeYoutubeBottom.php +++ b/view/modeYoutubeBottom.php @@ -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 = '
' . humanTiming(_strtotime($created)) . ''; + }else{ + $html = ''; } $video['creator'] = Video::getCreatorHTML($video['users_id'], $html); $source = Video::getSourceFile($video['filename']); diff --git a/view/trending.php b/view/trending.php index 7856918b20..f2c1b62bb5 100644 --- a/view/trending.php +++ b/view/trending.php @@ -124,6 +124,8 @@ $_page->setExtraStyles( '; } if (!empty($advancedCustom->showChannelNameOnVideoItem)) { ?>