From: Brion Vibber Date: Thu, 25 Feb 2010 23:52:34 +0000 (+0000) Subject: Tweak common_url_to_nickname to take the last path component; fixes pulling nicks... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=593885f98c206a3acffdb179feae544e05a50ef2;p=quix0rs-gnu-social.git Tweak common_url_to_nickname to take the last path component; fixes pulling nicks from Google profile pages (path is "/profile/") --- diff --git a/lib/util.php b/lib/util.php index d1c78f7d07..8381bc63c0 100644 --- a/lib/util.php +++ b/lib/util.php @@ -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); } }