From 8be28f478dd578f1b8fca561238b9ee5a13c6b27 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Tue, 13 Oct 2009 14:48:19 -0700 Subject: [PATCH 1/3] Fix syntax errors --- actions/apidirectmessagenew.php | 2 +- actions/apifavoritecreate.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/apidirectmessagenew.php b/actions/apidirectmessagenew.php index fa6cafbe8d..ca1ee70dde 100644 --- a/actions/apidirectmessagenew.php +++ b/actions/apidirectmessagenew.php @@ -157,7 +157,7 @@ class ApiDirectMessageNewAction extends ApiAuthAction // Note: sending msgs to yourself is allowed by Twitter $errmsg = 'Don\'t send a message to yourself; ' . - 'just say it to yourself quietly instead.' + 'just say it to yourself quietly instead.'; $this->clientError(_($errmsg), 403, $this->format); return; diff --git a/actions/apifavoritecreate.php b/actions/apifavoritecreate.php index a80a6492e9..4367397707 100644 --- a/actions/apifavoritecreate.php +++ b/actions/apifavoritecreate.php @@ -127,7 +127,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction if (empty($fave)) { $this->clientError( - _('Could not create favorite.') + _('Could not create favorite.'), 403, $this->format ); From ffeef6520c4e9e1d691bcea8a15aa8097ceb1d37 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 13 Oct 2009 14:51:23 -0700 Subject: [PATCH 2/3] 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/ChangeLog | 16 ++++++++++++++++ extlib/php-gettext/gettext.inc | 6 +++--- extlib/php-gettext/gettext.php | 6 +++--- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/extlib/php-gettext/ChangeLog b/extlib/php-gettext/ChangeLog index 5e0949dfd7..ab77d80810 100644 --- a/extlib/php-gettext/ChangeLog +++ b/extlib/php-gettext/ChangeLog @@ -1,3 +1,19 @@ +2006-02-28 Danilo Šegan + + * gettext.php: Added some comments about these workarounds for + different PHP versions and architectures. + +2006-02-28 Danilo Šegan + + Fixes bug #15923. + + * gettext.php (gettext_reader): make magic check work on 64-bit + platforms as well (by Steffen Pingel). + +2006-02-20 Danilo Šegan + + * gettext.inc (_bindtextdomain): Use php_uname to detect Windows. + 2006-02-07 Danilo Šegan * examples/pigs_dropin.php: comment-out bind_textdomain_codeset diff --git a/extlib/php-gettext/gettext.inc b/extlib/php-gettext/gettext.inc index eb94b256a6..fcaafe7c9e 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; } diff --git a/extlib/php-gettext/gettext.php b/extlib/php-gettext/gettext.php index ad94a987b7..cd080444ca 100644 --- a/extlib/php-gettext/gettext.php +++ b/extlib/php-gettext/gettext.php @@ -102,16 +102,16 @@ class gettext_reader { // Caching can be turned off $this->enable_cache = $enable_cache; - // $MAGIC1 = (int)0x950412de; //bug in PHP 5 + // $MAGIC1 = (int)0x950412de; //bug in PHP 5.0.2, see https://savannah.nongnu.org/bugs/?func=detailitem&item_id=10565 $MAGIC1 = (int) - 1794895138; // $MAGIC2 = (int)0xde120495; //bug $MAGIC2 = (int) - 569244523; $this->STREAM = $Reader; $magic = $this->readint(); - if ($magic == $MAGIC1) { + if ($magic == ($MAGIC1 & 0xFFFFFFFF)) { // to make sure it works for 64-bit platforms $this->BYTEORDER = 0; - } elseif ($magic == $MAGIC2) { + } elseif ($magic == ($MAGIC2 & 0xFFFFFFFF)) { $this->BYTEORDER = 1; } else { $this->error = 1; // not MO file From 6b5810f5d562260a0143446982bf22ef50298d80 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 14 Oct 2009 09:53:07 +0000 Subject: [PATCH 3/3] Moved to location of the FBConnect JavaScript to the end of . --- plugins/FBConnect/FBConnectPlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/FBConnect/FBConnectPlugin.php b/plugins/FBConnect/FBConnectPlugin.php index ff74aade45..b31f69d81a 100644 --- a/plugins/FBConnect/FBConnectPlugin.php +++ b/plugins/FBConnect/FBConnectPlugin.php @@ -102,7 +102,7 @@ class FBConnectPlugin extends Plugin // Note: this script needs to appear in the - function onStartShowHeader($action) + function onEndShowScripts($action) { if ($this->reqFbScripts($action)) {