forked from ZwiiCMS-Team/ZwiiCMS
Checksum md5
This commit is contained in:
parent
681b3d1c21
commit
59b5c9b2d3
@ -199,14 +199,14 @@ class install extends common {
|
|||||||
// URL sur le git
|
// URL sur le git
|
||||||
//$newVersion = helper::urlGetContents('https://zwiicms.fr/update/' . common::ZWII_UPDATE_CHANNEL . '/version');
|
//$newVersion = helper::urlGetContents('https://zwiicms.fr/update/' . common::ZWII_UPDATE_CHANNEL . '/version');
|
||||||
file_put_contents(self::TEMP_DIR.'update.tar.gz', helper::urlGetContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/update.tar.gz'));
|
file_put_contents(self::TEMP_DIR.'update.tar.gz', helper::urlGetContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/update.tar.gz'));
|
||||||
$md5a = helper::urlGetContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/update.md5');
|
$md5origin = helper::urlGetContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/update.md5');
|
||||||
$md5b = md5_file(self::TEMP_DIR.'update.tar.gz');
|
$md5origin = (explode(' ',$md5origin));
|
||||||
$success = $md5a === $md5b;
|
$md5target = md5_file(self::TEMP_DIR.'update.tar.gz');
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'display' => self::DISPLAY_JSON,
|
'display' => self::DISPLAY_JSON,
|
||||||
'content' => [
|
'content' => [
|
||||||
'success' => $success,
|
'success' => $md5origin[0] === $md5target,
|
||||||
'data' => null
|
'data' => null
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
Loading…
Reference in New Issue
Block a user