mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Setup: fixed issue when upgrading a DB (no install dir specified, thus no config file) and requesting a backup: the backup is created without the config file in it.
(Updated the readme for the upcoming release!) SVN:trunk[3037]
This commit is contained in:
@@ -112,23 +112,26 @@ class DBBackup
|
||||
$sDataFile = tempnam(SetupUtils::GetTmpDir(), 'itop-');
|
||||
$this->LogInfo("Data file: '$sDataFile'");
|
||||
|
||||
$aContents = array();
|
||||
$aContents[] = array(
|
||||
'source' => $sDataFile,
|
||||
'dest' => 'itop-dump.sql',
|
||||
);
|
||||
|
||||
if (is_null($sSourceConfigFile))
|
||||
{
|
||||
$sSourceConfigFile = MetaModel::GetConfig()->GetLoadedFile();
|
||||
}
|
||||
if (!empty($sSourceConfigFile))
|
||||
{
|
||||
$aContents[] = array(
|
||||
'source' => $sSourceConfigFile,
|
||||
'dest' => 'config-itop.php',
|
||||
);
|
||||
}
|
||||
|
||||
$this->DoBackup($sDataFile);
|
||||
|
||||
$aContents = array(
|
||||
array(
|
||||
'source' => $sDataFile,
|
||||
'dest' => 'itop-dump.sql',
|
||||
),
|
||||
array(
|
||||
'source' => $sSourceConfigFile,
|
||||
'dest' => 'config-itop.php',
|
||||
),
|
||||
);
|
||||
$sDeltaFile = APPROOT.'data/'.utils::GetCurrentEnvironment().'.delta.xml';
|
||||
if (file_exists($sDeltaFile))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user