Commit f359a539 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Merge branch '542-gefunden-von-ausgabe-bei-den-minisuchern-stimmt-nicht' into 'development'

Resolve "Gefunden von Ausgabe bei den Minisuchern stimmt nicht"

Closes #542

See merge request !967
parents 34a2d48e 43958561
......@@ -36,7 +36,7 @@ class MetaGer
protected $addedHosts = [];
protected $startCount = 0;
protected $canCache = false;
# Daten über die Abfrage
# Daten über die Abfrage$
protected $ip;
protected $language;
protected $agent;
......@@ -591,7 +591,6 @@ class MetaGer
foreach ($engines as $engine) {
$engine->startSearch($this);
}
// Derzeit deaktiviert, da es die eigene Suche gibt
// $this->adjustFocus($sumas, $enabledSearchengines);
......@@ -746,6 +745,7 @@ class MetaGer
public function loadMiniSucher($xml, $subcollections)
{
$minisucherEngine = $xml->xpath('suma[@name="minism"]')[0];
$minisucherEngine["subcollections"] = implode(", ", $subcollections);
$subcollections = urlencode("(" . implode(" OR ", $subcollections) . ")");
$minisucherEngine["formData"] = str_replace("<<SUBCOLLECTIONS>>", $subcollections, $minisucherEngine["formData"]);
$minisucherEngine["formData"] = str_replace("<<COUNT>>", sizeof($subcollections) * 10, $minisucherEngine["formData"]);
......
......@@ -6,7 +6,6 @@ use App\Models\Searchengine;
class Minisucher extends Searchengine
{
public function __construct(\SimpleXMLElement $engine, \App\MetaGer $metager)
{
parent::__construct($engine, $metager);
......@@ -55,23 +54,8 @@ class Minisucher extends Searchengine
$additionalInformation = ['date' => $dateVal];
$provider = $result->xpath('//doc/str[@name="subcollection"]')[0]->__toString();
if (isset($providerCounter[$provider]) && $providerCounter[$provider] > 10) {
continue;
} else {
if (!isset($providerCounter[$provider])) {
$providerCounter[$provider] = 0;
}
$providerCounter[$provider] += 1;
}
if (isset($provider)) {
$gefVon = "<a href=\"https://metager.de\" target=\"_blank\" rel=\"noopener\">Minisucher: $provider</a>";
} else {
$gefVon = $this->gefVon;
}
$minism = simplexml_load_string($this->engine)["subcollections"];
$gefVon = "<a href=\"https://metager.de\" target=\"_blank\" rel=\"noopener\">Minisucher: $minism </a>";
$this->results[] = new \App\Models\Result(
$this->engine,
......
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