N°1260 Config : migrate DB* variables to the Get() model, create CMDBSource::InitFromConfig

SVN:trunk[5308]
This commit is contained in:
Pierre Goiffon
2018-02-08 14:21:25 +00:00
parent 5a25e44177
commit d2f0deec9c
13 changed files with 426 additions and 366 deletions

View File

@@ -753,7 +753,7 @@ EOF
{
$sDBTableName = preg_replace('/[^A-za-z0-9_]/', '_', $sDBTableName); // Remove forbidden characters from the table name
}
$sPrefix = MetaModel::GetConfig()->GetDBSubName()."synchro_data_";
$sPrefix = MetaModel::GetConfig()->Get('db_subname')."synchro_data_";
if (strpos($sDBTableName, $sPrefix) !== 0)
{
$sDBTableName = $sPrefix.$sDBTableName;
@@ -972,7 +972,7 @@ EOF
}
}
$sDBName = MetaModel::GetConfig()->GetDBName();
$sDBName = MetaModel::GetConfig()->Get('db_name');
try
{
// Note: as per the MySQL documentation, using information_schema behaves exactly like SHOW TRIGGERS (user privileges)