Commit 2f8b0d66 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #25 in ZP/z-push from feature/ZP-662-backendcombined-simplify-config to develop

* commit '5c41dc02':
  ZP-662 Simplify BackendCombined config. Released under the Affero GNU General Public License (AGPL) version 3.

(cherry picked from commit 042bceb5)
parent ff679747
...@@ -73,10 +73,10 @@ class BackendCombined extends Backend { ...@@ -73,10 +73,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_DEBUG, sprintf("Combined %d backends loaded.", count($this->backends))); ZLog::Write(LOGLEVEL_DEBUG, 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