diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index ce81999b73..783761af5e 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2013-08-07 Miguel de Dios + + * godmode/setup/setup_auth.php, godmode/admin_access_logs.php, + godmode/agentes/module_manager.php: removed the code as + "call time passing variables by reference" deprecated in PHP 5.4. + + * index.php: improved the source code style. + 2013-08-06 Miguel de Dios * godmode/menu.php, godmode/massive/massive_edit_modules.php: diff --git a/pandora_console/godmode/admin_access_logs.php b/pandora_console/godmode/admin_access_logs.php index dc8281b549..618ad58a78 100644 --- a/pandora_console/godmode/admin_access_logs.php +++ b/pandora_console/godmode/admin_access_logs.php @@ -284,10 +284,10 @@ foreach ($result as $row) { switch ($config['dbtype']) { case "mysql": case "postgresql": - enterprise_hook('rowEnterpriseAudit', array($table, &$iterator, $row['id_sesion'])); + rowEnterpriseAudit$table, $iterator, $row['id_sesion']); break; case "oracle": - enterprise_hook('rowEnterpriseAudit', array($table, &$iterator, $row['id_sesion'])); + rowEnterpriseAudit($table, $iterator, $row['id_sesion']); break; } } diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php index 34b6ae1a03..9d0eb429d7 100644 --- a/pandora_console/godmode/agentes/module_manager.php +++ b/pandora_console/godmode/agentes/module_manager.php @@ -77,7 +77,9 @@ if ($wmi_available) if ($prediction_available) $modules['predictionserver'] = __('Create a new prediction server module'); -enterprise_hook ('set_enterprise_module_types', array (&$modules)); +if (enterprise_installed()) { + set_enterprise_module_types($modules); +} $sec2 = get_parameter('sec2', ''); if (strstr($sec2, "enterprise/godmode/policies/policies") !== false) { diff --git a/pandora_console/godmode/setup/setup_auth.php b/pandora_console/godmode/setup/setup_auth.php index 81447afb9e..3c50918955 100644 --- a/pandora_console/godmode/setup/setup_auth.php +++ b/pandora_console/godmode/setup/setup_auth.php @@ -36,7 +36,9 @@ $table->size[0] = '30%'; $table->data[0][0] = __('Authentication method'); $auth_methods = array ('mysql' => __('Local Pandora FMS'), 'ldap' => __('ldap')); -enterprise_hook ('add_enterprise_auth_methods', array (&$auth_methods)); +if (enterprise_installed()) { + add_enterprise_auth_methods($auth_methods); +} $table->data[0][1] = html_print_select ($auth_methods, 'auth', $config['auth'], 'show_selected_rows ();', '', 0, true); $table->data[1][0] = __('Autocreate remote users'); @@ -80,7 +82,9 @@ for ($i = 5; $i <= 10; $i++) { } // Add enterprise authentication options -enterprise_hook ('add_enterprise_auth_options', array (&$table, 11)); +if (enterprise_installed()) { + add_enterprise_auth_options($table, 11); +} echo '
'; html_print_input_hidden ('update_config', 1); diff --git a/pandora_console/index.php b/pandora_console/index.php index e94d8ab904..356c796aa6 100644 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -565,21 +565,23 @@ echo "\n\n"; // Values from PHP to be recovered from JAVASCRIPT require('include/php_to_js_values.php'); + + ?>