diff options
author | Brion Vibber <brion@pobox.com> | 2010-05-21 13:12:25 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-05-21 13:12:25 -0700 |
commit | 87b8a89aa7b96e63586bdd3b1afb9d43355fd48b (patch) | |
tree | ef227ad50cd25699d34dd1a3364ac0cf430443da /lib/util.php | |
parent | a39a934dd4a133bad6e76fa9a5018cedcb70225c (diff) | |
parent | bbfd6eff0c69f038d151d3bf6c8bf9b45a64716f (diff) |
Merge branch 'master' of gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php index 597da22c0..59d5132ec 100644 --- a/lib/util.php +++ b/lib/util.php @@ -1925,6 +1925,15 @@ function common_url_to_nickname($url) $path = preg_replace('@/$@', '', $parts['path']); $path = preg_replace('@^/@', '', $path); $path = basename($path); + + // Hack for MediaWiki user pages, in the form: + // http://example.com/wiki/User:Myname + // ('User' may be localized.) + if (strpos($path, ':')) { + $parts = array_filter(explode(':', $path)); + $path = $parts[count($parts) - 1]; + } + if ($path) { return common_nicknamize($path); } |