Tweak common_url_to_nickname to take the last path component; fixes pulling nicks from Google profile pages (path is "/profile/<nickname>")
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user