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:
parent
e254c660f6
commit
593885f98c
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user