2012-11-29 Ramon Novoa <rnovoa@artica.es>

* 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.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7202 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Ramon Novoa 2012-11-29 15:14:08 +00:00
parent 322931d552
commit 5d58a05c43
5 changed files with 46 additions and 25 deletions

View File

@ -1,3 +1,11 @@
2012-11-29 Ramon Novoa <rnovoa@artica.es>
* 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 <sergio.martin@artica.es> 2012-11-29 Sergio Martin <sergio.martin@artica.es>
* operation/netflow/nf_live_view.php * operation/netflow/nf_live_view.php

View File

@ -18,6 +18,19 @@ global $config;
check_login (); 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 ()) { if (is_ajax ()) {
$get_os_icon = (bool) get_parameter ('get_os_icon'); $get_os_icon = (bool) get_parameter ('get_os_icon');
$select_timezone = get_parameter ('select_timezone', 0); $select_timezone = get_parameter ('select_timezone', 0);
@ -33,37 +46,37 @@ if (is_ajax ()) {
switch ($zone) { switch ($zone) {
case 'Africa': case 'Africa':
$timezones = timezone_identifiers_list(DateTimeZone::AFRICA); $timezones = timezone_identifiers_list(AFRICA);
break; break;
case 'America': case 'America':
$timezones = timezone_identifiers_list(DateTimeZone::AMERICA); $timezones = timezone_identifiers_list(AMERICA);
break; break;
case 'Antarctica': case 'Antarctica':
$timezones = timezone_identifiers_list(DateTimeZone::ANTARCTICA); $timezones = timezone_identifiers_list(ANTARCTICA);
break; break;
case 'Arctic': case 'Arctic':
$timezones = timezone_identifiers_list(DateTimeZone::ARCTIC); $timezones = timezone_identifiers_list(ARCTIC);
break; break;
case 'Asia': case 'Asia':
$timezones = timezone_identifiers_list(DateTimeZone::ASIA); $timezones = timezone_identifiers_list(ASIA);
break; break;
case 'Atlantic': case 'Atlantic':
$timezones = timezone_identifiers_list(DateTimeZone::ATLANTIC); $timezones = timezone_identifiers_list(ATLANTIC);
break; break;
case 'Australia': case 'Australia':
$timezones = timezone_identifiers_list(DateTimeZone::AUSTRALIA); $timezones = timezone_identifiers_list(AUSTRALIA);
break; break;
case 'Europe': case 'Europe':
$timezones = timezone_identifiers_list(DateTimeZone::EUROPE); $timezones = timezone_identifiers_list(EUROPE);
break; break;
case 'Indian': case 'Indian':
$timezones = timezone_identifiers_list(DateTimeZone::INDIAN); $timezones = timezone_identifiers_list(INDIAN);
break; break;
case 'Pacific': case 'Pacific':
$timezones = timezone_identifiers_list(DateTimeZone::PACIFIC); $timezones = timezone_identifiers_list(PACIFIC);
break; break;
case 'UTC': case 'UTC':
$timezones = timezone_identifiers_list(DateTimeZone::UTC); $timezones = timezone_identifiers_list(UTC);
break; break;
default: default:
$timezones = array(); $timezones = array();
@ -250,37 +263,37 @@ if ($zone_selected == "") {
switch ($zone_selected) { switch ($zone_selected) {
case 'Africa': case 'Africa':
$timezones = timezone_identifiers_list(DateTimeZone::AFRICA); $timezones = timezone_identifiers_list(AFRICA);
break; break;
case 'America': case 'America':
$timezones = timezone_identifiers_list(DateTimeZone::AMERICA); $timezones = timezone_identifiers_list(AMERICA);
break; break;
case 'Antarctica': case 'Antarctica':
$timezones = timezone_identifiers_list(DateTimeZone::ANTARCTICA); $timezones = timezone_identifiers_list(ANTARCTICA);
break; break;
case 'Arctic': case 'Arctic':
$timezones = timezone_identifiers_list(DateTimeZone::ARCTIC); $timezones = timezone_identifiers_list(ARCTIC);
break; break;
case 'Asia': case 'Asia':
$timezones = timezone_identifiers_list(DateTimeZone::ASIA); $timezones = timezone_identifiers_list(ASIA);
break; break;
case 'Atlantic': case 'Atlantic':
$timezones = timezone_identifiers_list(DateTimeZone::ATLANTIC); $timezones = timezone_identifiers_list(ATLANTIC);
break; break;
case 'Australia': case 'Australia':
$timezones = timezone_identifiers_list(DateTimeZone::AUSTRALIA); $timezones = timezone_identifiers_list(AUSTRALIA);
break; break;
case 'Europe': case 'Europe':
$timezones = timezone_identifiers_list(DateTimeZone::EUROPE); $timezones = timezone_identifiers_list(EUROPE);
break; break;
case 'Indian': case 'Indian':
$timezones = timezone_identifiers_list(DateTimeZone::INDIAN); $timezones = timezone_identifiers_list(INDIAN);
break; break;
case 'Pacific': case 'Pacific':
$timezones = timezone_identifiers_list(DateTimeZone::PACIFIC); $timezones = timezone_identifiers_list(PACIFIC);
break; break;
case 'UTC': case 'UTC':
$timezones = timezone_identifiers_list(DateTimeZone::UTC); $timezones = timezone_identifiers_list(UTC);
break; break;
default: default:
$timezones = array(); $timezones = array();

View File

@ -33,7 +33,7 @@ if (empty($script_tz)){
global $develop_bypass; global $develop_bypass;
/* Help to debug problems. Override global PHP configuration */ /* Help to debug problems. Override global PHP configuration */
if (!isset($develop_bypass)) $develop_bypass = 0; $develop_bypass = 1;
if ($develop_bypass != 1) { if ($develop_bypass != 1) {
// error_reporting(E_ALL); // error_reporting(E_ALL);

View File

@ -69,6 +69,7 @@ if (is_ajax ())
metaconsole_restore_db(); metaconsole_restore_db();
} }
} }
/* /*
* It's a binary for branch (0 show - 1 hide) * It's a binary for branch (0 show - 1 hide)
* and there are 2 position * and there are 2 position
@ -119,7 +120,6 @@ if (is_ajax ())
} }
$rows = array_merge($rows, $server_rows); $rows = array_merge($rows, $server_rows);
} }
metaconsole_restore_db(); metaconsole_restore_db();
} }
$countRows = count ($rows); $countRows = count ($rows);