Compléter avec urlGetContents

This commit is contained in:
Fred Tempez 2020-04-28 10:34:11 +02:00
parent 345e0c69f9
commit 6a8bed0240
4 changed files with 4 additions and 4 deletions

View File

@ -36,7 +36,7 @@ class common {
const THUMBS_WIDTH = 640;
// Numéro de version
const ZWII_VERSION = '10.0.072';
const ZWII_VERSION = '10.0.073';
const ZWII_UPDATE_CHANNEL = "v10";
public static $actions = [];

View File

@ -245,7 +245,7 @@ class config extends common {
$site = helper::baseUrl(false); }
$success= false;
$googlePagespeedData = @file_get_contents('https://www.googleapis.com/pagespeedonline/v2/runPagespeed?url='. $site .'&screenshot=true');
$googlePagespeedData = helper::urlGetContents('https://www.googleapis.com/pagespeedonline/v2/runPagespeed?url='. $site .'&screenshot=true');
if ($googlePagespeedData !== false) {
$googlePagespeedData = json_decode($googlePagespeedData, true);
$screenshot = $googlePagespeedData['screenshot']['data'];

View File

@ -148,7 +148,7 @@ class install extends common {
// Téléchargement
case 2:
// Téléchargement depuis le serveur de Zwii
$success = (file_put_contents(self::TEMP_DIR.'update.tar.gz', file_get_contents('https://zwiicms.com/update/' . common::ZWII_UPDATE_CHANNEL . '/update.tar.gz')) !== false);
$success = (file_put_contents(self::TEMP_DIR.'update.tar.gz', helper::urlGetContents('https://zwiicms.com/update/' . common::ZWII_UPDATE_CHANNEL . '/update.tar.gz')) !== false);
// Valeurs en sortie
$this->addOutput([
'display' => self::DISPLAY_JSON,
@ -227,7 +227,7 @@ class install extends common {
*/
public function update() {
// Nouvelle version
self::$newVersion = file_get_contents('http://zwiicms.com/update/' . common::ZWII_UPDATE_CHANNEL . '/version');
self::$newVersion = helper::urlGetContents('http://zwiicms.com/update/' . common::ZWII_UPDATE_CHANNEL . '/version');
// Valeurs en sortie
$this->addOutput([
'display' => self::DISPLAY_LAYOUT_LIGHT,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB