]> git.mxchange.org Git - friendica.git/commitdiff
Fallback for empty names
authorMichael Vogel <icarus@dabo.de>
Sun, 10 Jul 2016 07:27:40 +0000 (09:27 +0200)
committerMichael Vogel <icarus@dabo.de>
Sun, 10 Jul 2016 07:27:40 +0000 (09:27 +0200)
include/Probe.php

index c31b98a9aa45aa3cda74fe54bda1f0ca75c50490..df2246f2064b91a88371e436f4cb3e9e03833248 100644 (file)
@@ -232,10 +232,15 @@ class Probe {
                else
                        $data["photo"] = App::get_baseurl().'/images/person-175.jpg';
 
-               if (!isset($data["name"]))
-                       $data["name"] = $data["url"];
+               if (!isset($data["name"]) OR ($data["name"] == "")) {
+                       if (isset($data["nick"]))
+                               $data["name"] = $data["nick"];
 
-               if (!isset($data["nick"])) {
+                       if ($data["name"] == "")
+                               $data["name"] = $data["url"];
+               }
+
+               if (!isset($data["nick"]) OR ($data["nick"] == "")) {
                        $data["nick"] = strtolower($data["name"]);
 
                        if (strpos($data['nick'], ' '))