]> git.mxchange.org Git - friendica.git/commitdiff
Ignore obvious garbage results
authorMichael <heluecht@pirati.ca>
Sat, 17 Mar 2018 06:54:47 +0000 (06:54 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 17 Mar 2018 06:54:47 +0000 (06:54 +0000)
mod/dirfind.php

index 52e7c2aa02b267225171f38e0405f7688490e098..da3fafce299fa4f2ac2c1b8b65fcf6b864556bc1 100644 (file)
@@ -149,10 +149,17 @@ function dirfind_content(App $a, $prefix = "") {
                                        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());
 
                                if ($result["name"] == "") {
-                                       $urlparts = parse_url($result["nurl"]);
                                        $result["name"] = end(explode("/", $urlparts["path"]));
                                }