From c08edc207ca0db3229ff5ee64697f0c2cdca6e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20Espi=C3=A9?= Date: Thu, 30 Nov 2017 08:58:58 +0000 Subject: [PATCH] =?UTF-8?q?N=C2=B01190=20-=20Better=20error=20reporting=20?= =?UTF-8?q?and=20disk=20cleanup.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SVN:trunk[5145] --- datamodels/2.x/itop-backup/ajax.backup.php | 4 +++- datamodels/2.x/itop-backup/dbrestore.class.inc.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/datamodels/2.x/itop-backup/ajax.backup.php b/datamodels/2.x/itop-backup/ajax.backup.php index fad2b1936..62e797c00 100644 --- a/datamodels/2.x/itop-backup/ajax.backup.php +++ b/datamodels/2.x/itop-backup/ajax.backup.php @@ -61,6 +61,7 @@ try catch (Exception $e) { $oPage->p('Error: '.$e->getMessage()); + IssueLog::Error($sOperation.' - '.$e->getMessage()); } } $oPage->output(); @@ -156,6 +157,7 @@ EOF { $oRestoreMutex->Unlock(); $oPage->p('Error: '.$e->getMessage()); + IssueLog::Error($sOperation.' - '.$e->getMessage()); } } $oPage->output(); @@ -179,6 +181,6 @@ EOF } catch (Exception $e) { - IssueLog::Error($e->getMessage()); + IssueLog::Error($sOperation.' - '.$e->getMessage()); } diff --git a/datamodels/2.x/itop-backup/dbrestore.class.inc.php b/datamodels/2.x/itop-backup/dbrestore.class.inc.php index 09a146eee..b8809d11a 100644 --- a/datamodels/2.x/itop-backup/dbrestore.class.inc.php +++ b/datamodels/2.x/itop-backup/dbrestore.class.inc.php @@ -131,7 +131,7 @@ class DBRestore extends DBBackup $oArchive->extractFileTo($sDataDir, 'itop-dump.sql'); $sDataFile = $sDataDir.'/itop-dump.sql'; $this->LoadDatabase($sDataFile); - unlink($sDataFile); + SetupUtils::rrmdir($sDataDir); // Update the code //