mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 04:10:38 +02:00
@@ -581,7 +581,15 @@ class e_file
|
|||||||
if (function_exists('file_get_contents') && ini_get('allow_url_fopen'))
|
if (function_exists('file_get_contents') && ini_get('allow_url_fopen'))
|
||||||
{
|
{
|
||||||
$old_timeout = e107_ini_set('default_socket_timeout', $timeout);
|
$old_timeout = e107_ini_set('default_socket_timeout', $timeout);
|
||||||
$data = file_get_contents($address);
|
|
||||||
|
$context = array(
|
||||||
|
'ssl' => array(
|
||||||
|
'verify_peer' => false,
|
||||||
|
'verify_peer_name' => false,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
$data = file_get_contents($address, false, stream_context_create($context));
|
||||||
|
|
||||||
// $data = file_get_contents(htmlspecialchars($address)); // buggy - sometimes fails.
|
// $data = file_get_contents(htmlspecialchars($address)); // buggy - sometimes fails.
|
||||||
if ($old_timeout !== FALSE)
|
if ($old_timeout !== FALSE)
|
||||||
|
@@ -1599,7 +1599,7 @@ class e_library_manager
|
|||||||
// The library will be cached with version number, so this only run once per library.
|
// The library will be cached with version number, so this only run once per library.
|
||||||
if(substr($file, 0, 4) == 'http')
|
if(substr($file, 0, 4) == 'http')
|
||||||
{
|
{
|
||||||
$content = file_get_contents($file);
|
$content = e107::getFile()->getRemoteContent($file);
|
||||||
$tmpFile = tempnam(sys_get_temp_dir(), 'lib_');
|
$tmpFile = tempnam(sys_get_temp_dir(), 'lib_');
|
||||||
|
|
||||||
if($tmpFile)
|
if($tmpFile)
|
||||||
|
Reference in New Issue
Block a user