Code refactoring : fix of #876 implemented in 2.0.3 as [r3161], moved to a place where it will fix other implementations of the setup

SVN:trunk[4252]
This commit is contained in:
Romain Quetiez
2016-06-23 08:14:43 +00:00
parent 3b1886a435
commit ebd0ae85a4
2 changed files with 10 additions and 9 deletions

View File

@@ -596,6 +596,10 @@ class RunTimeEnvironment
public function RecordInstallation(Config $oConfig, $sDataModelVersion, $aSelectedModules, $sModulesRelativePath, $sShortComment = null)
{
// Have it work fine even if the DB has been set in read-only mode for the users
$iPrevAccessMode = $oConfig->Get('access_mode');
$oConfig->Set('access_mode', ACCESS_FULL);
if ($sShortComment === null)
{
$sShortComment = 'Done by the setup program';
@@ -665,6 +669,10 @@ class RunTimeEnvironment
$oInstallRec->Set('installed', $iInstallationTime);
$oInstallRec->DBInsertNoReload();
}
// Restore the previous access mode
$oConfig->Set('access_mode', $iPrevAccessMode);
// Database is created, installation has been tracked into it
return true;
}