From 77afd6c3448335b3a46c98c78fbbda733fc5d586 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 13 Oct 2009 14:51:23 -0700 Subject: Commit upstream updates to php-gettext after the 1.0.7 release (but in 2006! :P) Fixes file magic checks on 64-bit systems. http://bazaar.launchpad.net/~danilo/php-gettext/trunk/revision/17 http://bazaar.launchpad.net/~danilo/php-gettext/trunk/revision/18 http://bazaar.launchpad.net/~danilo/php-gettext/trunk/revision/19 --- extlib/php-gettext/gettext.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'extlib/php-gettext/gettext.inc') diff --git a/extlib/php-gettext/gettext.inc b/extlib/php-gettext/gettext.inc index eb94b256a..fcaafe7c9 100644 --- a/extlib/php-gettext/gettext.inc +++ b/extlib/php-gettext/gettext.inc @@ -148,9 +148,9 @@ function _setlocale($category, $locale) { */ function _bindtextdomain($domain, $path) { global $text_domains; - // ensure $path ends with a slash - if ($path[strlen($path) - 1] != '/') $path .= '/'; - elseif ($path[strlen($path) - 1] != '\\') $path .= '\\'; + // ensure $path ends with a slash + if ($path[strlen($path) - 1] != '/') $path .= '/'; + elseif ($path[strlen($path) - 1] != '\\') $path .= '\\'; $text_domains[$domain]->path = $path; } -- cgit v1.2.3-54-g00ecf From 21e17e3738a3c026dd8efb6558ae5124cbaf3c61 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 16 Oct 2009 11:19:52 -0700 Subject: Fix a logic error in php-gettext's setlocale() check; if setlocale() failed to return, we fall back to checking LANG environment variable. Now actually works when doing a setlocale *check* instead of a *set*. Submitting fix upstream, but as the package is currently unmaintained it may not make it in. --- extlib/php-gettext/gettext.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extlib/php-gettext/gettext.inc') diff --git a/extlib/php-gettext/gettext.inc b/extlib/php-gettext/gettext.inc index fcaafe7c9..7c95e40ec 100644 --- a/extlib/php-gettext/gettext.inc +++ b/extlib/php-gettext/gettext.inc @@ -129,7 +129,7 @@ function _setlocale($category, $locale) { $ret = 0; if (function_exists('setlocale')) // I don't know if this ever happens ;) $ret = setlocale($category, $locale); - if (($ret and $locale == '') or ($ret == $locale)) { + if ($ret and ($locale == '' or $ret == $locale)) { $EMULATEGETTEXT = 0; $CURRENTLOCALE = $ret; } else { -- cgit v1.2.3-54-g00ecf