Ignore obvious garbage results
This commit is contained in:
parent
d616bb7564
commit
69918f4ae9
1 changed files with 8 additions and 1 deletions
|
@ -149,10 +149,17 @@ function dirfind_content(App $a, $prefix = "") {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$urlparts = parse_url($result["nurl"]);
|
||||||
|
|
||||||
|
// Ignore results that look strange.
|
||||||
|
// For historic reasons the gcontact table does contain some garbage.
|
||||||
|
if (!empty($urlparts['query']) || !empty($urlparts['fragment'])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$result = Contact::getDetailsByURL($result["nurl"], local_user());
|
$result = Contact::getDetailsByURL($result["nurl"], local_user());
|
||||||
|
|
||||||
if ($result["name"] == "") {
|
if ($result["name"] == "") {
|
||||||
$urlparts = parse_url($result["nurl"]);
|
|
||||||
$result["name"] = end(explode("/", $urlparts["path"]));
|
$result["name"] = end(explode("/", $urlparts["path"]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue