2010-02-20 Sancho Lerena <slerena@artica.es>

* include/gettext.php: Applied patch to solve problem in 64bit
        systems. Thanks Junichi!.  



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2392 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2010-02-21 18:37:55 +00:00
parent e76cdb0747
commit 1044c0a75f
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2010-02-20 Sancho Lerena <slerena@artica.es>
* include/gettext.php: Applied patch to solve problem in 64bit
systems. Thanks Junichi!.
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.

View File

@ -114,11 +114,14 @@ class gettext_reader {
// $MAGIC2 = (int)0xde120495; //bug
$MAGIC2 = (int) - 569244523;
// Applied patch for 64bit systems
// http://source.ibiblio.org/trac/lyceum/attachment/ticket/652/gettext-64bit-fix.diff
$this->STREAM = $Reader;
$magic = $this->readint();
if ($magic == $MAGIC1) {
$this->BYTEORDER = 0;
} elseif ($magic == $MAGIC2) {
if ($magic == ($MAGIC1 & 0xFFFFFFFF)) {
$this->BYTEORDER = 0;
} elseif ($magic == ($MAGIC2 & 0xFFFFFFFF)) {
$this->BYTEORDER = 1;
} else {
$this->error = 1; // not MO file