diff options
author | Zach Copley <zach@status.net> | 2010-02-25 16:07:32 -0800 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-02-25 16:07:32 -0800 |
commit | 82cac2be595953029e61f2e6f21122206b82314e (patch) | |
tree | 7412949e83096339d86bdb5e5f20e9229ff5c1c3 /lib | |
parent | 7922edb5b6c4ad55a1b81fa16c93e5656b676b26 (diff) | |
parent | 45435a7c033d9c5acf0352bc44408667c5690198 (diff) |
Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
* 'testing' of gitorious.org:statusnet/mainline:
OStatus: if no <link> available and no profileurl hint passed in, use object id if it's an HTTP(S) URL. Fixes profile link for Google accounts.
Tweak common_url_to_nickname to take the last path component; fixes pulling nicks from Google profile pages (path is "/profile/<nickname>")
Fix bug on subscribe/unsubscribe in profile lists. Bogus call to nonexisting profile->getProfile() was masked by DB_DataObject
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/util.php b/lib/util.php index d1c78f7d0..8381bc63c 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); } } |