diff options
author | Brion Vibber <brion@pobox.com> | 2010-06-10 15:37:06 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-06-10 15:37:06 -0700 |
commit | b1a68e15b760aa2e588680c9e8c7526a7a6d1d13 (patch) | |
tree | 6100f1aa00f9930433f178173099c0ce67fdc502 /lib/util.php | |
parent | 7cc58b97feb822ab999b7fefa3a50ce53a7838d5 (diff) | |
parent | e121d472e7dbb914a85b10bde0a9e2add4d19d11 (diff) |
Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 1.0.x
Conflicts:
lib/default.php
lib/util.php
plugins/UrlShortener/UrlShortenerPlugin.php (has been removed?)
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/util.php b/lib/util.php index c6d8f814d..d8fb3b65e 100644 --- a/lib/util.php +++ b/lib/util.php @@ -1270,9 +1270,8 @@ function common_enqueue_notice($notice) $transports[] = 'plugin'; } - // @fixme move these checks into QueueManager and/or individual handlers - if ($notice->is_local == Notice::LOCAL_PUBLIC || - $notice->is_local == Notice::LOCAL_NONPUBLIC) { + // We can skip these for gatewayed notices. + if ($notice->isLocal()) { $transports = array_merge($transports, $localTransports); } @@ -1969,6 +1968,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); } |