diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 2b76365823..444a72c079 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2012-11-29 Ramon Novoa + + * include/functions_treeview.php, + include/config_process.php, + operation/tree.php, + godmode/setup/setup.php: Manually defined DateTimeZone constants + since they don't seem to be available in certain PHP versions. + 2012-11-29 Sergio Martin * operation/netflow/nf_live_view.php diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index 094f8e6088..94636d46d0 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -18,6 +18,19 @@ global $config; check_login (); +// See http://php.net/manual/es/class.datetimezone.php +define ("AFRICA", 1); +define ("AMERICA", 2); +define ("ANTARCTICA", 4); +define ("ARCTIC", 8); +define ("ASIA", 16); +define ("ATLANTIC", 32); +define ("AUSTRALIA", 64); +define ("EUROPE", 128); +define ("INDIAN", 256); +define ("PACIFIC", 512); +define ("UTC", 1024); + if (is_ajax ()) { $get_os_icon = (bool) get_parameter ('get_os_icon'); $select_timezone = get_parameter ('select_timezone', 0); @@ -33,37 +46,37 @@ if (is_ajax ()) { switch ($zone) { case 'Africa': - $timezones = timezone_identifiers_list(DateTimeZone::AFRICA); + $timezones = timezone_identifiers_list(AFRICA); break; case 'America': - $timezones = timezone_identifiers_list(DateTimeZone::AMERICA); + $timezones = timezone_identifiers_list(AMERICA); break; case 'Antarctica': - $timezones = timezone_identifiers_list(DateTimeZone::ANTARCTICA); + $timezones = timezone_identifiers_list(ANTARCTICA); break; case 'Arctic': - $timezones = timezone_identifiers_list(DateTimeZone::ARCTIC); + $timezones = timezone_identifiers_list(ARCTIC); break; case 'Asia': - $timezones = timezone_identifiers_list(DateTimeZone::ASIA); + $timezones = timezone_identifiers_list(ASIA); break; case 'Atlantic': - $timezones = timezone_identifiers_list(DateTimeZone::ATLANTIC); + $timezones = timezone_identifiers_list(ATLANTIC); break; case 'Australia': - $timezones = timezone_identifiers_list(DateTimeZone::AUSTRALIA); + $timezones = timezone_identifiers_list(AUSTRALIA); break; case 'Europe': - $timezones = timezone_identifiers_list(DateTimeZone::EUROPE); + $timezones = timezone_identifiers_list(EUROPE); break; case 'Indian': - $timezones = timezone_identifiers_list(DateTimeZone::INDIAN); + $timezones = timezone_identifiers_list(INDIAN); break; case 'Pacific': - $timezones = timezone_identifiers_list(DateTimeZone::PACIFIC); + $timezones = timezone_identifiers_list(PACIFIC); break; case 'UTC': - $timezones = timezone_identifiers_list(DateTimeZone::UTC); + $timezones = timezone_identifiers_list(UTC); break; default: $timezones = array(); @@ -250,37 +263,37 @@ if ($zone_selected == "") { switch ($zone_selected) { case 'Africa': - $timezones = timezone_identifiers_list(DateTimeZone::AFRICA); + $timezones = timezone_identifiers_list(AFRICA); break; case 'America': - $timezones = timezone_identifiers_list(DateTimeZone::AMERICA); + $timezones = timezone_identifiers_list(AMERICA); break; case 'Antarctica': - $timezones = timezone_identifiers_list(DateTimeZone::ANTARCTICA); + $timezones = timezone_identifiers_list(ANTARCTICA); break; case 'Arctic': - $timezones = timezone_identifiers_list(DateTimeZone::ARCTIC); + $timezones = timezone_identifiers_list(ARCTIC); break; case 'Asia': - $timezones = timezone_identifiers_list(DateTimeZone::ASIA); + $timezones = timezone_identifiers_list(ASIA); break; case 'Atlantic': - $timezones = timezone_identifiers_list(DateTimeZone::ATLANTIC); + $timezones = timezone_identifiers_list(ATLANTIC); break; case 'Australia': - $timezones = timezone_identifiers_list(DateTimeZone::AUSTRALIA); + $timezones = timezone_identifiers_list(AUSTRALIA); break; case 'Europe': - $timezones = timezone_identifiers_list(DateTimeZone::EUROPE); + $timezones = timezone_identifiers_list(EUROPE); break; case 'Indian': - $timezones = timezone_identifiers_list(DateTimeZone::INDIAN); + $timezones = timezone_identifiers_list(INDIAN); break; case 'Pacific': - $timezones = timezone_identifiers_list(DateTimeZone::PACIFIC); + $timezones = timezone_identifiers_list(PACIFIC); break; case 'UTC': - $timezones = timezone_identifiers_list(DateTimeZone::UTC); + $timezones = timezone_identifiers_list(UTC); break; default: $timezones = array(); diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index b8f1cf1268..47b9fe3523 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -33,7 +33,7 @@ if (empty($script_tz)){ global $develop_bypass; /* Help to debug problems. Override global PHP configuration */ -if (!isset($develop_bypass)) $develop_bypass = 0; +$develop_bypass = 1; if ($develop_bypass != 1) { // error_reporting(E_ALL); diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php index 0e67ddc7bb..6e160f6a0e 100755 --- a/pandora_console/include/functions_treeview.php +++ b/pandora_console/include/functions_treeview.php @@ -16,7 +16,7 @@ function treeview_printTable($id_agente, $console_url = '') { global $config; - + require_once ("include/functions_agents.php"); require_once ($config["homedir"] . '/include/functions_graph.php'); include_graphs_dependencies(); diff --git a/pandora_console/operation/tree.php b/pandora_console/operation/tree.php index e4564991da..3204c83c47 100644 --- a/pandora_console/operation/tree.php +++ b/pandora_console/operation/tree.php @@ -69,6 +69,7 @@ if (is_ajax ()) metaconsole_restore_db(); } } + /* * It's a binary for branch (0 show - 1 hide) * and there are 2 position @@ -119,7 +120,6 @@ if (is_ajax ()) } $rows = array_merge($rows, $server_rows); } - metaconsole_restore_db(); } $countRows = count ($rows);