Skip to content
Snippets Groups Projects
Commit e7efa512 authored by Davide Aprea's avatar Davide Aprea
Browse files

Merge branch '1062-add-dummy-engine-to-docker-installation' of...

Merge branch '1062-add-dummy-engine-to-docker-installation' of https://gitlab.metager.de/open-source/MetaGer into 1062-add-dummy-engine-to-docker-installation
parents e7c9d77d c31d3dfe
No related branches found
No related tags found
3 merge requests!1895Development,!1775Development,!1765Resolve "add dummy-engine to docker installation"
......@@ -675,6 +675,11 @@ class MetaGer
$this->enabledSearchengines["bing"] = $this->sumaFile->sumas->{"bing"};
}
# Setting dummy engine as active if it exists (suma file created from example)
if ($this->getFokus() === "web" && isset($this->sumaFile->sumas->{"dummy"})) {
$this->enabledSearchengines["dummy"] = $this->sumaFile->sumas->{"dummy"};
}
if (sizeof($this->enabledSearchengines) === 0) {
$filter = "";
foreach ($this->queryFilter as $queryFilter => $filterPhrase) {
......@@ -758,6 +763,10 @@ class MetaGer
foreach ($this->engines as $engine) {
$keys[] = $engine->hash;
}
# Noch searchengines enabled
if (empty($keys)) {
return;
}
$cacheValues = Cache::many($keys);
foreach ($this->engines as $engine) {
if ($cacheValues[$engine->hash] !== null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment