From d2a7ddd4680ac91a8e3c4a2f9da9ee3cb4fb455c Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Tue, 22 Jan 2013 09:22:56 +0000 Subject: [PATCH] 2013-01-22 Sergio Martin * include/functions_tags.php: Fix a empty value return to array() to avoid foreach problems * index.php: Redirect to metaconsole when activate it git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7517 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ pandora_console/include/functions_tags.php | 2 +- pandora_console/index.php | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index bd00517098..270549de0a 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2013-01-22 Sergio Martin + + * include/functions_tags.php: Fix a empty value return + to array() to avoid foreach problems + + * index.php: Redirect to metaconsole when activate it + 2013-01-21 Sergio Martin * include/functions_users.php diff --git a/pandora_console/include/functions_tags.php b/pandora_console/include/functions_tags.php index cb5e0bb1d2..ad4590256e 100644 --- a/pandora_console/include/functions_tags.php +++ b/pandora_console/include/functions_tags.php @@ -516,7 +516,7 @@ function tags_get_module_tags ($id_agent_module){ $tags = db_get_all_rows_filter('ttag_module', array('id_agente_modulo' => $id_agent_module), false); if ($tags === false) - return false; + return array(); $return = array(); foreach ($tags as $tag){ diff --git a/pandora_console/index.php b/pandora_console/index.php index 74c4b4daa0..83e43842d1 100644 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -62,6 +62,11 @@ if ((! file_exists ("include/config.php")) || (! is_readable ("include/config.ph session_start (); require_once ("include/config.php"); +// If metaconsole activated, redirect to it +if($config['metaconsole'] == 1 && $config['enterprise_installed'] == 1) { + header ("Location: " . $config['homeurl'] . "enterprise/meta"); +} + /* Enterprise support */ if (file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) { include_once (ENTERPRISE_DIR . "/load_enterprise.php");