From 29d2e1d7c4ac33144c3b259245f2f80eb8237b61 Mon Sep 17 00:00:00 2001 From: Daniel Neto Date: Fri, 2 Feb 2024 22:41:51 -0300 Subject: [PATCH] Update --- .htaccess | 3 +++ plugin/VR360/Objects/VideosVR360.php | 14 ++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.htaccess b/.htaccess index 5896a5385e..1d511d0309 100644 --- a/.htaccess +++ b/.htaccess @@ -418,6 +418,9 @@ Options All -Indexes + # Allow direct access to files in the convertedMP4 directory + RewriteRule ^videos/convertedMP4/(.+(\.(mp4|webm|m3u8|mp3|ogg|jpg)))$ /videos/convertedMP4/$1 [L] + RewriteRule ^videos/([_A-Za-z0-9.-]+/)?([^!#$&'()*+,\/:;=?@[\]]+(\.(mp4|webm|m3u8|mp3|ogg)))$ view/xsendfile.php?file=$2&folder=$1 [QSA] RewriteRule ^videos/cache/download/([_A-Za-z0-9.-]+/)?([^!#$&'()*+,\/:;=?@[\]]+(\.(mp4|webm|m3u8|mp3|ogg)))$ view/xsendfile.php?file=$2&cacheDownload=1 [QSA] diff --git a/plugin/VR360/Objects/VideosVR360.php b/plugin/VR360/Objects/VideosVR360.php index d38c222a16..ff85f2b98b 100644 --- a/plugin/VR360/Objects/VideosVR360.php +++ b/plugin/VR360/Objects/VideosVR360.php @@ -48,15 +48,13 @@ class VideosVR360 extends ObjectYPT { if (!static::isTableInstalled()) { return false; } + /** + * + * @var array $global + * @var object $global['mysqli'] + */ $videos_id = intval($videos_id); - $sql = "SELECT * FROM ".static::getTableName()." WHERE videos_id = $videos_id LIMIT 1"; - $res = $global['mysqli']->query($sql); - if ($res) { - $row = $res->fetch_assoc(); - } else { - $row = false; - } - return $row; + return Video::getVideoLight($videos_id); } static function isVR360Enabled($videos_id){