mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°4332 - Fix table name
This commit is contained in:
@@ -71,11 +71,9 @@ class AuthentLDAPInstaller extends ModuleInstallerAPI
|
||||
public static function AfterDataLoad(Config $oConfiguration, $sPreviousVersion, $sCurrentVersion)
|
||||
{
|
||||
// Create missing table entries
|
||||
$sTablePrefix = $oConfiguration->Get('db_subname');
|
||||
if (strlen($sTablePrefix) != 0) {
|
||||
$sTablePrefix .= '.';
|
||||
}
|
||||
$sSQL = "insert into {$sTablePrefix}priv_user_ldap (id) select U.id from {$sTablePrefix}priv_user as U left join {$sTablePrefix}priv_user_ldap as L on U.id = L.id where U.finalclass='UserLDAP' and isnull(L.id);";
|
||||
$sUserLDAPTable = MetaModel::DBGetTable('UserLDAP');
|
||||
$sUserTable = MetaModel::DBGetTable('User');
|
||||
$sSQL = "insert into $sUserLDAPTable (id) select U.id from $sUserTable as U left join $sUserLDAPTable as L on U.id = L.id where U.finalclass='UserLDAP' and isnull(L.id);";
|
||||
CMDBSource::Query($sSQL);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user