From c06b11a83d5d2669f94d99bcda3f0f1de95483d3 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Fri, 14 May 2010 09:01:38 +0000 Subject: [PATCH] 2010-05-14 Miguel de Dios * include/gettext.php: Sorry I forget part of changes in "fixed the bug of pseudo-gettext with diferent arquitectures. Now check the arquitecture before." Fixes: #2991545 * godmode/agentes/configurar_agente.php: fixed lost the require file. Fixes: #3000337 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2726 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 10 +++++++ .../godmode/agentes/configurar_agente.php | 1 + pandora_console/include/gettext.php | 27 ++++++++++++++----- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index ee4fb476b2..f0d346a07e 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,13 @@ +2010-05-14 Miguel de Dios + + * include/gettext.php: Sorry I forget part of changes in "fixed the bug of + pseudo-gettext with diferent arquitectures. Now check the arquitecture + before." + Fixes: #2991545 + + * godmode/agentes/configurar_agente.php: fixed lost the require file. + Fixes: #3000337 + 2010-05-13 Raúl Mateos * operation/agentes/group_view.php: Clean code. Close tags. Now, if diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 45391a1005..913aa4faa7 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -36,6 +36,7 @@ if (! give_acl ($config["id_user"], $group, "AW")) { require_once ('include/functions_modules.php'); require_once ('include/functions_alerts.php'); +require_once ('include/functions_reporting.php'); // Get passed variables $tab = get_parameter ('tab', 'main'); diff --git a/pandora_console/include/gettext.php b/pandora_console/include/gettext.php index fa86b57e69..61d5d7c80f 100644 --- a/pandora_console/include/gettext.php +++ b/pandora_console/include/gettext.php @@ -126,13 +126,26 @@ class gettext_reader { $this->STREAM = $Reader; $magic = $this->readint(); - if ($magic == ($MAGIC1 & 0xFFFFFFFF)) { - $this->BYTEORDER = 0; - } elseif ($magic == ($MAGIC2 & 0xFFFFFFFF)) { - $this->BYTEORDER = 1; - } else { - $this->error = 1; // not MO file - return false; + + if ($enabled64Bits) { + if ($magic == ($MAGIC1 & 0xFFFFFFFF)) { + $this->BYTEORDER = 0; + } elseif ($magic == ($MAGIC2 & 0xFFFFFFFF)) { + $this->BYTEORDER = 1; + } else { + $this->error = 1; // not MO file + return false; + } + } + else { + if ($magic == $MAGIC1) { + $this->BYTEORDER = 0; + } elseif ($magic == $MAGIC2) { + $this->BYTEORDER = 1; + } else { + $this->error = 1; // not MO file + return false; + } } // FIXME: Do we care about revision? We should.