diff options
author | Brenda Wallace <shiny@cpan.org> | 2010-08-16 02:52:23 +0000 |
---|---|---|
committer | Brenda Wallace <shiny@cpan.org> | 2010-08-16 02:52:23 +0000 |
commit | 640e7e7c43fa8e9b1a8516b486e560df84bd9887 (patch) | |
tree | 26f895ccbdbc4510d377e283a47bf66c52d5d5a7 /lib/util.php | |
parent | af4fd327429fcc01769b33ece458a77a37b2463f (diff) | |
parent | c1cab9bfb83496d941f9a4da918d1e9221f3a08a (diff) |
Merge commit 'origin/0.9.x' into 0.9.x
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/util.php b/lib/util.php index 524ce0071..66600c766 100644 --- a/lib/util.php +++ b/lib/util.php @@ -88,8 +88,8 @@ function common_init_language() // don't do the job. en_US.UTF-8 should be there most of the // time, but not guaranteed. $ok = common_init_locale("en_US"); - if (!$ok) { - // Try to find a complete, working locale... + if (!$ok && strtolower(substr(PHP_OS, 0, 3)) != 'win') { + // Try to find a complete, working locale on Unix/Linux... // @fixme shelling out feels awfully inefficient // but I don't think there's a more standard way. $all = `locale -a`; @@ -101,9 +101,9 @@ function common_init_language() } } } - if (!$ok) { - common_log(LOG_ERR, "Unable to find a UTF-8 locale on this system; UI translations may not work."); - } + } + if (!$ok) { + common_log(LOG_ERR, "Unable to find a UTF-8 locale on this system; UI translations may not work."); } $locale_set = common_init_locale($language); } @@ -830,7 +830,10 @@ function common_linkify($url) { } elseif (is_string($longurl_data)) { $longurl = $longurl_data; } else { - throw new ServerException("Can't linkify url '$url'"); + // Unable to reach the server to verify contents, etc + // Just pass the link on through for now. + common_log(LOG_ERR, "Can't linkify url '$url'"); + $longurl = $url; } } $attrs = array('href' => $canon, 'title' => $longurl, 'rel' => 'external'); @@ -1249,9 +1252,8 @@ function common_enqueue_notice($notice) $transports[] = 'jabber'; } - // @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); if ($xmpp) { $transports[] = 'public'; |