[www-doc] [Git][VideoLAN.org/websites][master] Don't query remote screenshot URLs on page generation.
Konstantin Pavlov (@thresh)
gitlab at videolan.org
Wed Mar 1 02:17:10 UTC 2023
Konstantin Pavlov pushed to branch master at VideoLAN organization / websites
Commits:
b8af202e by Konstantin Pavlov at 2023-02-28T18:15:25-08:00
Don't query remote screenshot URLs on page generation.
- - - - -
1 changed file:
- www.videolan.org/include/os-specific.php
Changes:
=====================================
www.videolan.org/include/os-specific.php
=====================================
@@ -623,8 +623,8 @@ function getScreenshots($os) {
function getImageOrientation($imgPath) {
$aspect = 'landscape';
- if (substr($imgPath, 0, 4) != "http" && substr($imgPath, 0, 2) == '//') {
- $imgPath = 'http:'.$imgPath;
+ if (substr($imgPath, 0, 4) != "http" && substr($imgPath, 0, 21) == '//images.videolan.org') {
+ $imgPath = str_replace ("//images.videolan.org/", $_SERVER["DOCUMENT_ROOT"], $imgPath);
}
$size = getimagesize($imgPath);
if ($size[0] < $size[1]) {
View it on GitLab: https://code.videolan.org/VideoLAN.org/websites/-/commit/b8af202ee3361b9d729e25024018d89cb691e762
--
View it on GitLab: https://code.videolan.org/VideoLAN.org/websites/-/commit/b8af202ee3361b9d729e25024018d89cb691e762
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the www-doc
mailing list