diff options
author | Brion Vibber <brion@pobox.com> | 2010-05-21 13:15:08 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-05-21 13:15:08 -0700 |
commit | 6eae5d6a7e2265de4065b764c28cef3ee009bcda (patch) | |
tree | 05cc133095a73fb4e04ad921fbb8ae2a44ff7ba5 /lib/util.php | |
parent | afd81a540a556ef04bdc326a26268dc82b0dc5f6 (diff) | |
parent | 87b8a89aa7b96e63586bdd3b1afb9d43355fd48b (diff) |
Merge branch 'testing' into 0.9.x
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 1e58f960c..524ce0071 100644 --- a/lib/util.php +++ b/lib/util.php @@ -1939,6 +1939,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); } |