Commit 7dbe8b1a authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Merge branch '177-such-cache' into 'development'

Ein Fehler in Exalead repariert

Closes #177

See merge request !256
parents af09d378 6a69daa8
......@@ -15,6 +15,7 @@ class Exalead extends Searchengine
public function loadResults ($result)
{
# die($result);
$result = preg_replace("/\r\n/si", "", $result);
try {
$content = simplexml_load_string($result);
......@@ -50,9 +51,15 @@ class Exalead extends Searchengine
$title = $result->xpath("a:metas/a:Meta[@name='title']/a:MetaString[@name='value']")[0]->__toString();
$link = $result->xpath("a:metas/a:Meta[@name='url']/a:MetaString[@name='value']")[0]->__toString();
$anzeigeLink = $link;
if(sizeOf($result->xpath("a:metas/a:Meta[@name='metadesc']/a:MetaString[@name='value']")) === 0)
$descr = "";
else
$descr = "";
if(sizeOf($result->xpath("a:metas/a:Meta[@name='metadesc']/a:MetaString[@name='value']")) === 0 && sizeOf($result->xpath("a:metas/a:Meta[@name='summary']/a:MetaText[@name='value']")) !== 0)
{
$tmp = $result->xpath("a:metas/a:Meta[@name='summary']/a:MetaText[@name='value']");
foreach($tmp as $el)
{
$descr .= strip_tags($el->asXML());
}
}else
$descr = $result->xpath("a:metas/a:Meta[@name='metadesc']/a:MetaString[@name='value']")[0]->__toString();
$this->counter++;
$this->results[] = new \App\Models\Result(
......
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