From ea9b7eddde6c5c21b9938018fa45240dd41d9940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20Espi=C3=A9?= Date: Wed, 22 Aug 2018 10:16:35 +0000 Subject: [PATCH] =?UTF-8?q?N=C2=B01595=20-=20Setup=20:=20Blocking=20error?= =?UTF-8?q?=20on=20backup=20failure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SVN:trunk[6010] --- composer.json | 4 +++- setup/backup.class.inc.php | 16 +++++++++------- setup/tar.php | 4 ++-- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index dbe0c210d..8bd34a0a7 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,9 @@ "ext-mcrypt": "*", "ext-cli": "*", "ext-soap": "*", - "ext-json": "*" + "ext-json": "*", + "ext-zip": "*", + "ext-mysqli": "*" }, "config": { "platform": { diff --git a/setup/backup.class.inc.php b/setup/backup.class.inc.php index 25bdbeae3..cb1816814 100644 --- a/setup/backup.class.inc.php +++ b/setup/backup.class.inc.php @@ -235,18 +235,20 @@ if (class_exists('ZipArchive')) // The setup must be able to start even if the " /** * Create a normalized backup name, depending on the current date/time and Database * - * @param sNameSpec string Name and path, eventually containing itop placeholders + time formatting specs + * @param string sMySQLBinDir Name and path, eventually containing itop placeholders + time formatting specs */ public function SetMySQLBinDir($sMySQLBinDir) { $this->sMySQLBinDir = $sMySQLBinDir; } - /** - * Create a normalized backup name, depending on the current date/time and Database - * - * @param string sNameSpec Name and path, eventually containing itop placeholders + time formatting specs - */ + /** + * Create a normalized backup name, depending on the current date/time and Database + * + * @param string sNameSpec Name and path, eventually containing itop placeholders + time formatting specs + * + * @return string + */ public function MakeName($sNameSpec = "__DB__-%Y-%m-%d") { $sFileName = $sNameSpec; @@ -646,7 +648,7 @@ if (class_exists('ZipArchive')) // The setup must be able to start even if the " { if (empty($sData)) { - return; + return ''; } return ' --'.$sCliArgName.'='.self::EscapeShellArg($sData); diff --git a/setup/tar.php b/setup/tar.php index b07589715..72c074bc5 100644 --- a/setup/tar.php +++ b/setup/tar.php @@ -680,7 +680,7 @@ class ArchiveTar */ public function _error($p_message) { - $this->error_object = $this->raiseError($p_message); + IssueLog::Error($p_message); } /** @@ -688,7 +688,7 @@ class ArchiveTar */ public function _warning($p_message) { - $this->error_object = $this->raiseError($p_message); + IssueLog::Warning($p_message); } /**