Commit d2001374 authored by Dominik Hebeler's avatar Dominik Hebeler

Merge branch '925-image-search-not-working' into 'development'

Resolve "Image Search not working"

Closes #925

See merge request !1495
parents 05d9e36b 57c6d824
......@@ -164,7 +164,7 @@ class RequestFetcher extends Command
curl_setopt($ch, CURLOPT_USERPWD, $job["username"] . ":" . $job["password"]);
}
if (!empty($job["headers"])) {
if (!empty($job["headers"]) && sizeof($job["headers"]) > 0) {
$headers = [];
foreach ($job["headers"] as $key => $value) {
$headers[] = $key . ":" . $value;
......
......@@ -58,11 +58,14 @@ abstract class Searchengine
$this->password = $this->engine->{"http-auth-credentials"}->password;
}
if ($this->engine->{"request-header"}) {
if (!empty($this->engine->{"request-header"})) {
$this->headers = [];
foreach ($this->headers as $key => $value) {
foreach ($this->engine->{"request-header"} as $key => $value) {
$this->headers[$key] = $value;
}
if (sizeof($this->headers) == 0) {
$this->headers = null;
}
}
# Suchstring generieren
......
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