Commit dc295480 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixes #5234 Force Config object update after FD Web setup

parent eaaa02fe
......@@ -486,25 +486,26 @@ class config {
}
/* Check that configuration is in LDAP, check that no plugin got installed since last configuration update */
function checkLdapConfig ()
function checkLdapConfig ($forceReload = FALSE)
{
global $ui;
$ldap = $this->get_ldap_link();
$dn = CONFIGRDN.$this->current['BASE'];
$reload = TRUE;
$ldap->cat($dn, array('fusionConfigMd5'));
if ($attrs = $ldap->fetch()) {
if (isset($attrs['fusionConfigMd5'][0]) && ($attrs['fusionConfigMd5'][0] == md5_file(CACHE_DIR."/".CLASS_CACHE))) {
$reload = FALSE;
$dn = CONFIGRDN.$this->current['BASE'];
if (!$forceReload) {
$ldap = $this->get_ldap_link();
$ldap->cat($dn, array('fusionConfigMd5'));
if ($attrs = $ldap->fetch()) {
if (isset($attrs['fusionConfigMd5'][0]) && ($attrs['fusionConfigMd5'][0] == md5_file(CACHE_DIR.'/'.CLASS_CACHE))) {
return;
}
}
}
if ($reload) {
add_lock($dn, $ui->dn);
$config_plugin = objects::open($dn, 'configuration');
$config_plugin->save_object();
$config_plugin->save();
del_lock($dn);
}
add_lock($dn, $ui->dn);
$config_plugin = objects::open($dn, 'configuration');
$config_plugin->save_object();
$config_plugin->save();
del_lock($dn);
}
function load_inldap_config()
......
......@@ -76,7 +76,7 @@ class Step_Finish extends setupStep
/* Now we can save LDAP config */
$config->loadPlist($plist);
$config->checkLdapConfig();
$config->checkLdapConfig(TRUE);
}
function execute()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment