]> git.mxchange.org Git - friendica.git/commitdiff
If the nick is missing then take the first part of the name
authorMichael Vogel <icarus@dabo.de>
Fri, 8 Jul 2016 18:37:10 +0000 (20:37 +0200)
committerMichael Vogel <icarus@dabo.de>
Fri, 8 Jul 2016 18:37:10 +0000 (20:37 +0200)
include/Probe.php

index 8b6039a6f661856108f120367a25dbdace0a9624..9dc2a370b9e77098eaa9c807f24e05e73093d69d 100644 (file)
@@ -5,11 +5,9 @@
  * To-Do:
  *
  * - OStatus links with index.php
+ * - OStatus alias link
  * - Non absolute URL in feeds?
- * - Check for tumblr feed?
- * - more logging?
  * - Workaround for misconfigured Friendica servers?
- * - Check if Hubzilla servers with OStatus are detected correctly
  *
  */
 
@@ -135,9 +133,13 @@ class Probe {
                if (!isset($data["name"]))
                        $data["name"] = $data["url"];
 
-               if (!isset($data["nick"]))
+               if (!isset($data["nick"])) {
                        $data["nick"] = strtolower($data["name"]);
 
+                       if (strpos($data['nick'], ' '))
+                               $data['nick'] = trim(substr($data['nick'], 0, strpos($data['nick'], ' ')));
+               }
+
                if (!isset($data["network"]))
                        $data["network"] = NETWORK_PHANTOM;