From ab4c1ba0fc45d45811551bb1efc5fec199fd08b6 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 30 Sep 2010 12:43:31 +0000 Subject: [PATCH] 2010-09-30 Miguel de Dios * include/functions_db.php: cleaned source code style. * mobile/include/system.class.php: fixed when include this file in other parts of pandora, as when unlogin try generate pdf file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3330 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ pandora_console/include/functions_db.php | 3 ++- pandora_console/mobile/include/system.class.php | 4 +++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 17dc55998d..4b3a23b7c8 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2010-09-30 Miguel de Dios + + * include/functions_db.php: cleaned source code style. + + * mobile/include/system.class.php: fixed when include this file in other + parts of pandora, as when unlogin try generate pdf file. + 2010-09-30 Miguel de Dios * include/functions_db.php: in function "checklogin" fixed the include of diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index 44971ee1df..1a4cd4cb61 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -141,7 +141,8 @@ function check_acl ($id_user, $id_group, $access) { return 0; } elseif (is_user_admin ($id_user)) { return 1; - } else { + } + else { $id_group = (int) $id_group; } diff --git a/pandora_console/mobile/include/system.class.php b/pandora_console/mobile/include/system.class.php index ab5a39244a..a4c7e1238c 100644 --- a/pandora_console/mobile/include/system.class.php +++ b/pandora_console/mobile/include/system.class.php @@ -12,7 +12,9 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -require_once('../include/config.php'); +if (!isset($config)) { + require_once('../include/config.php'); +} require_once('db.class.php'); class System {