This commit is contained in:
Abdulrahman
2019-05-08 03:53:46 +03:00
parent e26157c5b1
commit 9471ffb3d2
2 changed files with 9 additions and 22 deletions

View File

@@ -149,6 +149,7 @@ if ($down_new_pack)
$files = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);
$update_failed = false;
$failed_files = [];
//maintenance mode on
update_config('siteclose', 1);
@@ -184,6 +185,7 @@ if ($down_new_pack)
))
{
$update_failed = true;
array_push($failed_files, $file_path);
break;
}
@@ -202,7 +204,11 @@ if ($down_new_pack)
if ($update_failed)
{
kleeja_admin_err('updating process has failed...');
kleeja_admin_err(
'updating process has failed...' .
(defined('DEV_STAGE') ? '[' . implode(', ', $failed_files) . ']' : '')
);
$zip = new ZipArchive;
$zip->open($localVersion);
$zip->extractTo(PATH);