From 8d1e97c8b7bf8d24091f27cdb01df308daaec960 Mon Sep 17 00:00:00 2001 From: plegall Date: Sat, 27 Aug 2022 17:27:03 +0200 Subject: [PATCH] fixes #1712 fallback to fetchRemote function, works best --- admin/include/functions.php | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/admin/include/functions.php b/admin/include/functions.php index 05246112b..d234449dc 100644 --- a/admin/include/functions.php +++ b/admin/include/functions.php @@ -3476,23 +3476,7 @@ function get_piwigo_news($start, $count) $forum_url = PHPWG_URL.'/forum'; $url = $forum_url.'/news.php?format=json&limit='.$count; - if (conf_get_param('porg_fetch_news_check_ssl', true)) - { - $content = file_get_contents($url); - } - else - { - $arrContextOptions = array( - "ssl" => array( - "verify_peer" => false, - "verify_peer_name" => false, - ), - ); - - $content = file_get_contents($url, false, stream_context_create($arrContextOptions)); - } - - if ($content !== false) + if (fetchRemote($url, $content)) { $all_news = array();