diff options
author | Brenda Wallace <shiny@cpan.org> | 2010-05-22 20:06:18 +1200 |
---|---|---|
committer | Brenda Wallace <shiny@cpan.org> | 2010-05-22 20:06:18 +1200 |
commit | d7d49942f76a00fad2c23175cdc5b7c5a2973814 (patch) | |
tree | 1e82bab9b641272d473f9d3ff63c98d53b988960 /lib/util.php | |
parent | fa4a2d34855da5eca29d81409cb5fbd64f13faba (diff) | |
parent | 6eae5d6a7e2265de4065b764c28cef3ee009bcda (diff) |
Merge commit 'mainline/0.9.x' 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); } |