ZP-662 Simplify BackendCombined config. Released under the Affero GNU General...

ZP-662 Simplify BackendCombined config. Released under the Affero GNU General Public License (AGPL) version 3.
parent 1b6974c2
......@@ -72,10 +72,10 @@ class BackendCombined extends Backend {
parent::Backend();
$this->config = BackendCombinedConfig::GetBackendCombinedConfig();
foreach ($this->config['backends'] as $i => $b){
// load and instatiate backend
ZPush::IncludeBackend($b['name']);
$this->backends[$i] = new $b['name']();
$backend_values = array_unique(array_values($this->config['folderbackend']));
foreach ($backend_values as $i) {
ZPush::IncludeBackend($this->config['backends'][$i]['name']);
$this->backends[$i] = new $this->config['backends'][$i]['name']();
}
ZLog::Write(LOGLEVEL_INFO, sprintf("Combined %d backends loaded.", count($this->backends)));
}
......
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