]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Tweak common_url_to_nickname to take the last path component; fixes pulling nicks...
authorBrion Vibber <brion@pobox.com>
Thu, 25 Feb 2010 23:52:34 +0000 (23:52 +0000)
committerBrion Vibber <brion@pobox.com>
Thu, 25 Feb 2010 23:52:34 +0000 (23:52 +0000)
lib/util.php

index d1c78f7d07893eec54df31bf6a83139f8ea1bfc6..8381bc63c0da254706de3129750fc83cbab5b2f6 100644 (file)
@@ -1698,7 +1698,8 @@ function common_url_to_nickname($url)
             # Strip starting, ending slashes
             $path = preg_replace('@/$@', '', $parts['path']);
             $path = preg_replace('@^/@', '', $path);
-            if (strpos($path, '/') === false) {
+            $path = basename($path);
+            if ($path) {
                 return common_nicknamize($path);
             }
         }