forked from ZwiiCMS-Team/ZwiiCMS
Compléter avec urlGetContents
This commit is contained in:
parent
345e0c69f9
commit
6a8bed0240
@ -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 = [];
|
||||
|
@ -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'];
|
||||
|
@ -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 |
Loading…
Reference in New Issue
Block a user