Bump gateway protocol to 1.2

This commit is contained in:
Samuel Georges 2021-03-31 15:26:13 +11:00
parent 7688215f84
commit 76fcf77799
1 changed files with 5 additions and 3 deletions

View File

@ -613,8 +613,9 @@ class UpdateManager
{
$fileCode = $name . $hash;
$filePath = $this->getFilePath($fileCode);
$innerPath = str_replace('.', '/', strtolower($name));
if (!Zip::extract($filePath, plugins_path())) {
if (!Zip::extract($filePath, plugins_path($innerPath))) {
throw new ApplicationException(Lang::get('system::lang.zip.extract_failed', ['file' => $filePath]));
}
@ -655,8 +656,9 @@ class UpdateManager
{
$fileCode = $name . $hash;
$filePath = $this->getFilePath($fileCode);
$innerPath = str_replace('.', '-', strtolower($name));
if (!Zip::extract($filePath, themes_path())) {
if (!Zip::extract($filePath, themes_path($innerPath))) {
throw new ApplicationException(Lang::get('system::lang.zip.extract_failed', ['file' => $filePath]));
}
@ -958,7 +960,7 @@ class UpdateManager
*/
protected function applyHttpAttributes($http, $postData)
{
$postData['protocol_version'] = '1.1';
$postData['protocol_version'] = '1.2';
$postData['client'] = 'october';
$postData['server'] = base64_encode(serialize([