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 { ...@@ -72,10 +72,10 @@ class BackendCombined extends Backend {
parent::Backend(); parent::Backend();
$this->config = BackendCombinedConfig::GetBackendCombinedConfig(); $this->config = BackendCombinedConfig::GetBackendCombinedConfig();
foreach ($this->config['backends'] as $i => $b){ $backend_values = array_unique(array_values($this->config['folderbackend']));
// load and instatiate backend foreach ($backend_values as $i) {
ZPush::IncludeBackend($b['name']); ZPush::IncludeBackend($this->config['backends'][$i]['name']);
$this->backends[$i] = new $b['name'](); $this->backends[$i] = new $this->config['backends'][$i]['name']();
} }
ZLog::Write(LOGLEVEL_INFO, sprintf("Combined %d backends loaded.", count($this->backends))); 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