Remove special handling for file_get_contents(), use libcurl instead

This commit is contained in:
ljm42
2024-03-19 11:52:59 -07:00
parent 78dcc575d6
commit cb84d60e00
4 changed files with 33 additions and 51 deletions
@@ -14,7 +14,6 @@
<?
$docroot ??= ($_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp');
require_once "$docroot/plugins/dynamix.docker.manager/include/Helpers.php";
require_once "$docroot/webGui/include/Helpers.php";
require_once "$docroot/webGui/include/Wrappers.php";
// add translations
@@ -177,7 +176,7 @@ class DockerTemplates {
}
// if after above we don't have a valid url, check for GitLab
if (empty($github_api['url'])) {
$source = file_get_contents($url, false, getProxyStreamContext($url));
$source = $this->download_url($url);
// the following should always exist for GitLab Community Edition or GitLab Enterprise Edition
if (preg_match("/<meta content='GitLab (Community|Enterprise) Edition' name='description'>/", $source) > 0) {
$parse = parse_url($url);