Skip to content
Snippets Groups Projects
Commit 6aeb31ec authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Merge branch '496-yandex-phrasensuche' into 'development'

Automatische Korrektur von Yandex ignoriert

Closes #496

See merge request !867
parents 331b60d6 60fd65a1
No related branches found
No related tags found
2 merge requests!868Development,!867Automatische Korrektur von Yandex ignoriert
...@@ -23,6 +23,15 @@ class Yandex extends Searchengine ...@@ -23,6 +23,15 @@ class Yandex extends Searchengine
return; return;
} }
# let's check if the query got unquoted
# in that case we will ignore all results because that would mean
# a string search (query between "") was wished and no results for that foudn
$reask = $content->xpath("//yandexsearch/response/reask");
if(sizeof($reask) !== 0 && $reask[0]->{"rule"}->__toString()){
return;
}
$results = $content->xpath("//yandexsearch/response/results/grouping/group"); $results = $content->xpath("//yandexsearch/response/results/grouping/group");
foreach ($results as $result) { foreach ($results as $result) {
$title = strip_tags($result->{"doc"}->{"title"}->asXML()); $title = strip_tags($result->{"doc"}->{"title"}->asXML());
......
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