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

:ambulance: fix(5135) Fix management config loading

issue #5135
Showing with 8 additions and 3 deletions
+8 -3
...@@ -513,10 +513,13 @@ class config ...@@ -513,10 +513,13 @@ class config
private function loadManagementConfig() private function loadManagementConfig()
{ {
if (isset($this->current['MANAGEMENTCONFIG'])) { if (isset($this->current['MANAGEMENTCONFIG'])) {
if (!is_array($this->current['MANAGEMENTCONFIG'])) {
$this->current['MANAGEMENTCONFIG'] = array($this->current['MANAGEMENTCONFIG']);
}
$value = array(); $value = array();
foreach ($this->current['MANAGEMENTCONFIG'] as $value) { foreach ($this->current['MANAGEMENTCONFIG'] as $config) {
list($class, $config) = explode(':', $value, 2); list($class, $json) = explode(':', $config, 2);
$value[$class] = $config; $value[$class] = $json;
} }
$this->current['MANAGEMENTCONFIG'] = $value; $this->current['MANAGEMENTCONFIG'] = $value;
} }
...@@ -552,6 +555,8 @@ class config ...@@ -552,6 +555,8 @@ class config
if (!$ldap->modify_batch($changes)) { if (!$ldap->modify_batch($changes)) {
return array($ldap->get_error()); return array($ldap->get_error());
} }
$this->current['MANAGEMENTCONFIG'][$managementClass] = $managementConfig;
return array();
} }
/*! /*!
......
Supports Markdown
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